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 2005 Forums
 Transact-SQL (2005)
 Triggers - Database to Database

Author  Topic 

syedtameem11
Starting Member

6 Posts

Posted - 2009-06-30 : 04:38:54
Hi,

I want to use triggers to make changes to another database after we insert or update a record. The table name is same

for ex. FIELD_EXECUTIVE_DETAILS table there in Test1 Database and FIELD_EXECUTIVE_DETAILS in Test2 database. All the columns are same in both the databases.

How can i add a trigger to test1 database for field_executive_details so that the same data gets changed/ inserted in test2 database.

Thank you,
Syed

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2009-06-30 : 09:39:25
I doubt you can do this. What's your real requirement? If you are trying to keep two databases in synch there are better ways.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-30 : 13:12:52
you can do this. however, if your attempt is to synchronize b/w dbs i think replication would be better choice.
Go to Top of Page
   

- Advertisement -