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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy updated records only from Database A to Database B

Status
Not open for further replies.

ColinGregory

Technical User
Feb 16, 2001
39
US
Hi everybody

Newbie question...

SQL Server 7

What is the best way to copy only the updated records from one database to another. We want to be able to input records in one database, then have them available in another database for testing purposes (availability doesn't have to be immediated). Am I right in thinking that replication will make both databases identical?

Thanks in advance for any assistance.
 
Replication is only needed if your data is distributed in a very wide environment in order to avoid high overhead on one server or to avoid long distance connections to that server.
Yes it does create a copy of your data in two or more different locations. It can be updated constantly and therefore the databases must be always online or intermittently, so they are independanbt.

For your purpose I don't recommend to implement any replication. Just do it at query level.
If you add a timestamp column to you tables then it will be easy to get only the modified records out using a query.

I usually add two columns to control any operation in my tables

data_add datetime default getdate()
data_mod timestamp

Bye


Qatqat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top