Sep 11, 2003 #1 dpm1234 Programmer Joined Aug 27, 2003 Messages 9 Location US I'd like to create a trigger on a table in db1 that is located on server1, that will insert a row into a table in db2 on server2. Something like: insert into svr2.db2.dbo.table2 .... Anyone have any ideas?
I'd like to create a trigger on a table in db1 that is located on server1, that will insert a row into a table in db2 on server2. Something like: insert into svr2.db2.dbo.table2 .... Anyone have any ideas?
Sep 11, 2003 #2 ClaireHCM IS-IT--Management Joined Mar 26, 2003 Messages 772 Location US Try this...but I didnt test it First of all,create linked server which connect to svr2 Then in the Srv1.db1 database execute the following query Create Trigger tr_itable1 on table1 for insert as insert into srv2.db2.dbo.table2 select * from inserted Upvote 0 Downvote
Try this...but I didnt test it First of all,create linked server which connect to svr2 Then in the Srv1.db1 database execute the following query Create Trigger tr_itable1 on table1 for insert as insert into srv2.db2.dbo.table2 select * from inserted
Sep 11, 2003 Thread starter #3 dpm1234 Programmer Joined Aug 27, 2003 Messages 9 Location US That sounds great, but can you give me a tip on how to create a linked server? Upvote 0 Downvote