Cross database triggers, possbile ? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Cross database triggers, possbile ?

Hey, Just one question, is it possible to have cross database triggers in MS SQL Server 2000 ? I mean, I want a trigger that when a record is entered in a table in one database, the value is duplicated (but in another form) to another table in another database (but both databases reside on the same physical server). Is this possible and how can this be done ? With the USE "dbname" I suppose, is this correct ? Thanks for your replies
"USE dbname" won’t work within a trigger. I doubt that you need to test that – it really should not work. You can refer to a table in another database on the same server as dbname.ownername.tablename – so it’s simple. You could even refer to a table in another database on a different server as servername.dbname.ownername.tablename, but it is very likely that this will slow down the execution of the trigger, causing the response times on this local db to go up.
Thanks a lot for the information !
quote:Originally posted by msouphy Thanks a lot for the information !
This information is very helpful, since I have a simliar problem. However, the server running the proc uses Windows authentication. The server I’m trying to get supporting information from requires a user name/password. How would I set that up? Thanks!
]]>