Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
matrix8182
Starting Member
7 Posts |
Posted - 2004-11-25 : 07:16:56
|
Hi, I was wondering if anyone knows how transfer records from one database to another (DTS) but only copy across records/fields that have changed since the last time or are different to whats currently in the recieving table?At present everything is overwritten each time which takes a while... I'd appreciate any advicethanksMartin |
|
|
Andraax
Aged Yak Warrior
790 Posts |
Posted - 2004-11-25 : 07:35:00
|
| Hi!Do you have to use DTS? I think this would be easier using linked servers for example.Anyway, if you want to use DTS, I guess you could add a flag to the table which shows if the row has been inserted/updated, and use that in the DTS package to select those rows, and then reset the flag. Or you could have a "changedate" column which records the exact date and time of the last change to the row. |
 |
|
|
matrix8182
Starting Member
7 Posts |
Posted - 2004-11-25 : 07:40:54
|
| Thanks for the reply Andraax,Thats pretty much the lines I was thinking along as the table needs a way of knowing what's changed and what hasn't. I guess there's no way that can use a system setting or parameter rather than adding a column as I'd prefer not to change the database structure as I didn't create it and it's already rolled out to clients! |
 |
|
|
Andraax
Aged Yak Warrior
790 Posts |
Posted - 2004-11-25 : 08:02:02
|
| Well, I think there is no way without changing the schema in some way. Of course, you could compare ALL the non-key columns to find changes, but I guess that would take longer than truncating and refilling the table... :) |
 |
|
|
ravilobo
Master Smack Fu Yak Hacker
1184 Posts |
Posted - 2004-11-26 : 10:58:43
|
| Replication and logshipping can solve this problem.------------------------I think, therefore I am |
 |
|
|
|
|
|