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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Syn. between two database

Author  Topic 

alvinso
Starting Member

1 Post

Posted - 2008-01-16 : 20:37:41
Hihi,

I am new to SQL script. My sutitation as here, I have two database MSSQL2000(Named as A)and MSSQL2005(Named as B).
I have to extract some data need to syn between the A and B everyday, therefore i have to write a script. The script have to check wheather any changes in A then to update it in B.
What should i do, as the database data is quite large(Over 20000rows), so i think only update all everytime is not practical. Any experts can give me some help?

thanks very much

nr
SQLTeam MVY

12543 Posts

Posted - 2008-01-17 : 06:23:29
Best would be to have an updated date on the table or timestamp. Record the value every time you run the script then in the run get everything later than that value.
For updated date you will need to use >= not > if updates can be running at the same time as your script as sql server can record the same datetime for consequtive transactions.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -