Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sybase ASE to MS SQL Server replication

Status
Not open for further replies.

bluebytez

Programmer
Dec 20, 2001
39
0
0
MY
Hi, wondering if anyone can help me out here. I need to set up replication between a Sybase ASE and MS SQL Server. What are the best ways to implement this ? Would I need to purchase Sybase Replication Agent ? or is there a way to do it with SQL Server as the primary server ? Really appreciate your opinions, thanks !
 
I'm just guessing that Rep Server won't do it for you. A couple of years back I implemented a general purpose update queue and replication capability. It was pretty straightforward and I'm sure it'd be easy for you to do it.

Basically, what you need is a queue (you can populate it by trigger--we were doing all updates through a program so the program took care of it, but triggers would work fine). Then you can create a simple program that reads the queue of updates and propegates them to the secondary server. My inclination would be to implement this in Java using a ResultSet as the generic container.

Your queue would contain:

table_name of the table modified
key value of the row's key (single-column keys obviously make this easier)
key column name (simplifies the program a little)
operation (insert, update, delete)

Your program periodically reads all the rows in the queue and performs the corresponding operation. In the case of INSERTs and UPDATEs, it reads the whole row from the source DB and then performs the operation on the target. In the case of a delete, it just uses the key to create a DELETE statement.

If you'd be interested in communicating directly with me about this problem, it's one I've done a fair amount of work on and I'd be interested if you've come up with a different solution or whatever.

Good luck!

John
nsjmcraig@netscape.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top