Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004

    Post Unanswered: How to create triggers in different database servers

    Dear All,

    I am trying to create a trigger on table A existing in Database A on Server A which on insert,update,delete would reflect these changes on table B in DatabaseB on Server B. I wrote the following syntax but it doesnt work

    CREATE trigger trg_upd_tableA
    On dbo.tableA
    for UPDATE
    --update the fields
    declare @cust_no varchar
    SELECT @cust_no = cust_no FROM inserted

    update ServerB.DatabaseB.dbo.tableB
    entity_type_cd = 'MFG',
    cust_no = 6699,
    name_en = 'NOVARTIS',
    status ='A',
    where cust_no= @cust_no

    I get the error below

    Another user has modified the contents of this table or view ; the database row you are modifying no longer exists in the database

    Database Error: '[Microsoft][ODBC SQL Server Driver][SQL Server] MSDTC on server 'DatabaseB' is unavailable'

    I would like anyone to reply to me as soon as possible please because i need the solution urgently

    Thanks alot in advance,
    Last edited by noha; 02-16-04 at 09:40.

  2. #2
    Join Date
    Dec 2002
    It would appear from the error message that the MSDTC service is either not installed or not running on ServerB. Can you check and verify that it is up and running? Make sure that the DTC service is set to Auto Start.



  3. #3
    Join Date
    Feb 2004

    Thaks alot

    You're right ... actually i found that the DTC service was stopped..

    Thanks for ur help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts