Monday, March 19, 2012

interdatabase trigger possible?

Hello to all,

I have say two databases A and B.
A database has tables a1 and a2.
B database has a table b1.

My question is

Can i write a trigger for the table b1, which access the fields from
the table a1 and a2?

Simply, can i write a trigger which access data from other databases?

Thank you in advance,
vishnuSure for different databases on the same server you can use the
threepart name: Database.Owner.ObjectName (e.g. SELECT * FROM
somedatabase.dbo.SomeTable)

For database on a different server you have to use a linekd server
within the fourpart name: linkedServername.Database.Owner.ObjectName
(e.g. SELECT * FROM linkedServername.Database.Owner.ObjectName )

HTH, jens Suessmeyer.

No comments:

Post a Comment