Results 1 to 2 of 2

Thread: While Inserting record through trigger on remote server through linked servers, SQL S

  1. #1
    Join Date
    Apr 2005
    Posts
    2

    While Inserting record through trigger on remote server through linked servers, SQL S

    While Inserting record through trigger on remote server through linked servers, SQL Server gets hanged.


    In my program, I am creating a trigger on a table for update, insert and delete. When any of this event is happened, the trigger is fired and one row gets inserted in the table which is on the remote server. To connect the table on the remote server, I am using linked servers.
    The triggers gets created successfully, but when any event is occured (update/insert/delete) SQL Server gets hanged.
    The trigger is :

    CREATE TRIGGER TR_TABLE_INSERT ON TABLE_48
    FOR INSERT
    AS
    set xact_abort on
    DECLARE @memberid int
    DECLARE @aliasid int
    SELECT @memberid=fid,@aliasid=faliasid from inserted
    INSERT [remoteserver].[dbname].[dbo].TABLENAME(PID,TABLE_ID,TABLE_NAME,EVENT,MEMBER_ID ,COMPOSITE_ID,TIME_STAMP) VALUES(48,2,'TABLE_48','I',@memberid,@aliasid,getd ate())

    My SQL Server 2000 version is 8.0.0.760.

    Can anybody help me on this?

  2. #2
    Join Date
    Feb 2003
    Posts
    1,048
    Answered in the "Ask an Expert" forum. Please don't post the same question in multiple forums.

Posting Permissions

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