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,189 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 47

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 47

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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 47

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 47

Expert Comment

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

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 47

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL: launch actions one before the other 10 22
export sql results to csv 6 34
Unable to Uninstall Visual Studio 2015 7 25
sql 2008 how to table join 2 12
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

775 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