Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    31

    Unhappy Unanswered: Unable to begin Distributed Transaction

    I am trying to insert data into a table on another Server(eg. Server B)
    through a trigger on a table in Server A. I have already created a linked server for Server B and hence i use a four part name(eg. serverB.Dbname.dbo.tablename) in my trigger. But I get an error saying that "SQLOLEDB is unable to begin the distributed transaction". What could be wrong....someone pls advise.

  2. #2
    Join Date
    Nov 2003
    Posts
    6
    ¡°NET¡¡STAR¡¡MSDTC¡±first in both server
    ¡¡

  3. #3
    Join Date
    Nov 2003
    Posts
    6
    first:in command line:"net star msdtc" or set msdtc auto start in service

    trigger:

    create trigger ....
    for ....
    as
    begin
    set XACT_ABORT on --<--ADD this code in your trigger
    ......

    end

  4. #4
    Join Date
    Nov 2003
    Posts
    31
    MSDTC is running on both servers and I have already added the code SET XACT_ABORT ON to my trigger code. I even tried removing the BEGIN DISTRIBUTED TRANSACTION and COMMIT TRAN tags off my code but no use. Here is an excerpt of my code.

    SET ANSI_DEFAULTS ON
    SET ANSI_NULLS ON
    SET ANSI_WARNINGS ON
    SET XACT_ABORT ON
    BEGIN DISTRIBUTED TRANSACTION
    insert into AP2K380.asiapac702_test.dbo.tblCustServiceHistoryH dr(
    ServiceCode,
    MerchCode,
    ServiceCentreCode,
    JobNumber,
    CustCode,
    ServiceDate,
    CompletionDate,
    ServiceStatus
    )

    values (
    @service_code,
    @merch_code,
    @service_centre_code,
    @sfm_field_1,
    @customer_code,
    @started_date_time,
    @completed_date_time,
    @status_selection
    )
    COMMIT TRAN

Posting Permissions

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