Tuesday 31 January 2012

Unable to begin a distributed transaction using linked server.


One of my client reported me that they are getting below given error when they were executing a query similar to below.


insert into <Table Nam> exec <LinkedServer Name>.<schema>.<DB Name>.<SP Name>


OLE DB provider "SQLNCLI" for linked server "LinkedServer Name" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 3
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "LinkedServer Name" was unable to begin a distributed transaction.

The below Setting Resolved the issue. I had to do the same in both servers.

1. open up "Component Services"
Control Panel > Administrative tools > Component Services
2. in Component Servies, right click "My Computer" and select "Properties"
Console Root > Component Services > Computers > My Computer
3. select the "MSDTC" tab (Select appropriate MSDTC if its clustered) , and click "Security Configuration" in the "Transaction Configuration" group box
4. Enable Allow inbound and Allow outbound.
5. in "Security Settings" > "Transaction Manager Communication"
select "No Authentication Required"
6. restart the DTC service (should do so automatically).



2 comments:

  1. Is Distributes Transaction Coordinator and MSDTC are the same? as I don't see 'MSDTC' tab

    ReplyDelete
    Replies
    1. Yes, both are same. Which version of windows you are using? Is it a cluster ?

      Delete