Data capture in sql

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
louis
Participant
Posts: 15
Joined: Mon Aug 06, 2007 5:47 pm

Data capture in sql

Post by louis »

Hi guys,

Need best way for following seniaro:

Need to replicate data in sql server 2005 db (25 tables) (max record volume in a table is 1 million), job needs to run daily and need to load data only if they have changed/updated or inserted.

server A Server B
Table A Table A
first day rec count 100 load all 100
next day rec count 120 load only 20

Please give your valuable suggestions.

Thanks
Every Thing Is Possible!!
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Couple of Options:

1. You can use a LookUp Stage and use the data in the target table as a reference to find the updates and inserts.
2. You can use Change Capture Stage to compare your source data between two consecutive runs and identify the inserts and updates.
Kris

Where's the "Any" key?-Homer Simpson
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Database deltas

Post by FranklinE »

For a low-volume database, we "cheat" a bit. Using the first load as the starting point for my description, the load file for the first day is the "new" file, and there is no "old" file involved. We preserve the "new" file and rename it to "old" for the next day's processing, and the Change Data Capture works very well for it.

For larger volumes, a better approach would be with the help of DBAs. I don't know SQL Server very well, but I do know that DB2 and Oracle can maintain change logs (in DB2, we use the BMC utilities). It is not DataStage, and I don't know it well enough to provide details, but in the end it is as simple as taking the change log from the "live" database and applying it to the other database. I've not heard of anything that's faster or more reliable.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why not use SQL Server replication? IBM's CDC product (formerly Data Mirror) would also be a solution if your budget could run to it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
louis
Participant
Posts: 15
Joined: Mon Aug 06, 2007 5:47 pm

Re: Data capture in sql

Post by louis »

Hi guys,

We have come up to add some audit cols in target & source tables one of them is the update date (Timestamp) which makes easy/simple, we will only pool and load date above that update date in target tables.

Thanks for your valuable approaches, makes me proud to be @ dsxchange.com.

Thanks,
Louis
Every Thing Is Possible!!
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Topic resolved? Do you like to mark it resolved?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply