Monday, February 20, 2012

MS SQL 2000 - How to reflect table updates

Hello!
I have 2 database (DB1 and DB2) in 1 server. I want to reflect new changes made in DB1.tbl_pm_project to DB2.tbl_pm_project. Any idea on how to do it.
Thank you
JJ-honHello!

I have 2 database (DB1 and DB2) in 1 server. I want to reflect new changes made in DB1.tbl_pm_project to DB2.tbl_pm_project. Any idea on how to do it.

Thank you
JJ-hon

What kind of changes? Structural changes or data changes? How often do the changes need to be reflected (real time, near real time or batch)?

I'll assume data changes (insert, update, delete) and that the requirement is for real time.

For two databases on the same server, your best bet is probably going to be a trigger. I do not like triggers that affect data across schema boundaries (ie, from one db to another), but this will probably be your quickest solution.

See SQL BOL.

Regards,

hmscott|||Triggers or DTS or Replication... according to your requirement.

As you have only one table and if data is not huge then Trigger is fine else normally it is not preferred.

It's all about how fast & consistent data changes you want to reflect.|||Or let a stored procedure update both databases in a transaction since they are on the same server.

No comments:

Post a Comment