August 20, 2003 at 10:04 am
Can triggers work across servers using linked servers or is there any other method to have triggers work across servers. Say i have a update trigger on table EMP database TEST on server A and when an update happens i want the update trigger to go and update table EMP database TEST1 on server B. Can anyone shed some light on this issue and how this can be achived.
August 20, 2003 at 11:05 pm
Triggers will work. But maybe replication will do it for you too? Anyhow, here's some sample trigger code...
SET XACT_ABORT ON
GO
CREATE TRIGGER EMP_Update
ON test.dbo.EMP
FOR UPDATE
AS
IF UPDATE(blah)
UPDATE B.test1.dbo.EMP
SET blah = i.blah
FROM B.test1.dbo.EMP a,
inserted i
WHERE a.PKfield = i.PKfield
GO
Cheers,
- Mark
Edited by - mccork on 08/20/2003 11:06:40 PM
Cheers,
- Mark
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply