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,062 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 45

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 45

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
 

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 45

Expert Comment

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

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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 45

Expert Comment

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

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 45

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now