locked
Linked server trigger error RRS feed

  • Question

  • hi,

    I am passing one trigger from A server to B server,  this is the trigger running on A server on LeaveDetails tble

    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER TRIGGER [dbo].[upload_leave] 
       ON   [dbo].[LeaveDetails]
       AFTER update
    AS 

    BEGIN
    SET NOCOUNT ON;
    insert into [Bserver-SQLDB-03].[BPayroll].dbo.LeaveTbl([ID],[CPR],[DateFrom],[DateTo],[Notes])
    select inserted.ID, EmployeeDetails.CPR,inserted.FromDate,inserted.ToDate,''
    FROM            EmployeeDetails INNER JOIN
                             inserted ON EmployeeDetails.ID = inserted.EmployeeID 
                             where inserted.LeaveStatus=9 and ResumeForm=0

    When front end the application call the trigger then this below error show. I tried in many ways to fix this issue but the error remain same. I found so many solution in google search as well on this Microsoft forum but still the issue remain same. Is any expert can help me.???? pls

    The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "Bserver-SQLDB-03" was unable to begin a distributed transaction.
    OLE DB provider "SQLNCLI11" for linked server "Bserver-SQLDB-03" returned message "No transaction is active.".


    Afzalkhan

    Thursday, May 4, 2017 5:35 AM

All replies