?
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
Medium Priority
?
2,671 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 51

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 51

Accepted Solution

by:
Vitor Montalvão earned 2000 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

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 51

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 51

Expert Comment

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

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 51

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

777 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