Solved

the operation could not be performed because OLE DB provider "SQLNCLI10" for linked server was unable to begin a distributed transaction

Posted on 2014-10-23
12
2,266 Views
Last Modified: 2014-10-23
Hi guys,

Any ideas how to stop the above error? Did a little reading around and tried executing the below line on Server A, Server B being the linked server. This happens when a trigger is firing.

EXEC sp_serveroption @server = 'ServerB',@optname = 'remote proc transaction promotion', @optvalue = 'false' ;

I should add that the trigger with this code fails:
USE [TestingArea]
GO
/****** Object:  Trigger [dbo].[UpdateAscentLinkedServer]    Script Date: 10/23/2014 11:07:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER TRIGGER [dbo].[UpdateAscentLinkedServer]
ON [dbo].[SysproBase]
AFTER UPDATE
AS
UPDATE [ASCENTLINK].[AscentXAF_Live].[dbo].[AscentCheckTable] SET AscentActive = 'False' WHERE AscentName = 'Joss'    

Open in new window


However if I manually run this line of code then it works fine:

UPDATE [ASCENTLINK].[AscentXAF_Live].[dbo].[AscentCheckTable] SET AscentActive = 'False' WHERE AscentName = 'Joss'  

Thanks,
Dean
0
Comment
Question by:deanlee17
  • 6
  • 6
12 Comments
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40399198
How's your MSDTC configured?
0
 

Author Comment

by:deanlee17
ID: 40399214
Hello Vitor,

Where do I check this?
0
 
LVL 48

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40399221
In Component Services, expand Computers / My Computer / Distributed Transaction Coordinator and then click Local DTC.
Network DTC Access should be Enabled. If not, enable it and test again.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:deanlee17
ID: 40399301
Ok ive located local DTC. I cant see Network DTC Access?

printscreen
0
 

Author Comment

by:deanlee17
ID: 40399317
Its ok I found it in properties
0
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40399322
Yes. Sorry, should be right-click and not only click.
0
 

Author Comment

by:deanlee17
ID: 40399350
Does this need to be done on both servers? ive done it on the local one and no change so far, will this need to be done on the one thats being linked to as well?
0
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40399358
Yes, better to do it on both servers since it's a distributed transaction.
0
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40399360
And you might need to enable the following options in the Security tab:
- Allow Inbound and Allow Outbound
0
 

Author Comment

by:deanlee17
ID: 40399372
Perfect, thanks.
0
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40399383
You are welcome.
When you are running manually the update, isn't a distributed transaction but a remote transaction and that's why it works. A distributed transaction means that you are making changes in the local server and also in remote server and that's why you need to configure MSDTC to allow that.
0
 

Author Comment

by:deanlee17
ID: 40399388
Ok perfect, thank you.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question