A.Goutam
A.Goutam

Reputation: 3494

import sybase data to sql server when any change make in table

I have a Sybase database which i want to migrate to SQL SERVER 2008R2. I have done this, but i got a new requirement. When any data is modified or new insert in table in Sybase that data only migrate from Sybase to Sql Server. The one table data is around 11,000135 so every time this is not possible to migrate all the data from Sybase to Sql Server. Is any possible way to do this?

Upvotes: 0

Views: 120

Answers (1)

www
www

Reputation: 4391

I don't see any straight forward solution here. I would use following steps to deal with that issue:

  1. Create table with unique key of source_table:

    Create table mod_date
    (
       key int unique,
       modified_date datetime
    ) 
    
  2. Create insert/update trigger for source_table that will be inserting/updating modified_date table.

  3. When selecting data from source_table join mod_date and filter out only dates grater than last update.

Opposite to create new table yuo could also add modified_date to your source_table and use it during select. GL!

Upvotes: 1

Related Questions