May 17, 2007 at 6:19 am
Hi,
I have two servers - On a daily basis Server A Executes a S. Proc on Server B which collects data (selects) from partictular tables and inserts into a local temp table on Server A.
Im getting 60% Success Rate The rest of the time returns the following:
Msg 7391, Level 16, State 2, Procedure procedurename, Line 20
The operation could not be performed because OLE DB provider "SQLNCLI" for
linked server "servername" was unable to begin a distributed transaction.
Both Servers are Windows 2003 Sp1 & SQL 2000 sp4, although I have seen this problembetween SQL 2005 & SQL 2000 sp4
They are in the same Workgroup. They are set up as Linked Servers in SQL and
have entries in the Hosts file on each server.
I've ruled out -
The MSDTC Security Settings
Firewall
Its not a loopback query
In fact.. the following query fails intermittently:
SET XACT_ABORT ON
BEGIN DISTRIBUTED TRANSACTION
SELECT *
FROM <server_name>.Pubs.dbo.Authors
WHERE au_lname = 'Ringer'
COMMIT
This issue is causing major problems, due to its nature and because its failure rate is high
Any help would be very much appreciated!!!!
May 18, 2007 at 7:51 am
You say you have ruled out MSDTC Security Settings, but I still think that is the problem. I turned on the top 6 checkboxes (Network DTC Access, Both Client Admin and all 3 Transaction Manager Comms). You may need to play with the TMC Auth buttons too. NOTE: you MUST REBOOT the machine after config changes. Restarting DTC is not sufficient.
Also see Microsoft KB 306212 for other possible causes.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 18, 2007 at 8:11 am
Thanks for the reply,
The settings I have are for the MSDTC are as follows:
Network DTC Access
Allow Remote Clients Allow Remote Admin
Allow Inbound Allow Outbound
No Authentication Required
Enable XA Transactions
The settings have been there since the machine was built and has had a reboot.
Mostly these settings work - its just the intermittentness of it that I cannot suss.
I have previously followed the microsoft article you have suggested and I can rule out any of there suggestions. I strongly believe it is in a bug in windows server 2003 sp1 but I have no proof. Any further suggestions would be greatly appreciated, Im running out of ideas and it is causing problems.
May 18, 2007 at 8:42 am
You did not mention the Transaction Manager Communication options. Make sure all three options are turned on in that section of the dialog. Did you check there registry settings mentioned in the KB I posted? Is the service set to login as NT Authority\NetworkService?
As a work around, try using remote sproc calls. You will need to ensure RPC and RPC OUT is TRUE in the linked server configuration. Also, do you HAVE to use Dist Tran, especially since you are only doing a select??
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 18, 2007 at 9:01 am
All options in the Transaction Manager Communication section are selected except: Enable TIP Transactions. RPC & RPC Out are both enabled in the linked servers and the MSDTC Service is logged in as NT Authority\NetworkService.
The SQL Service account also has sufficient permissions on the registry.
The SELECT Statement uses Dist Tran just to test the dist Tran between the servers. Its not the main code, too much to paste here
Sorry to be a pain, but I have been scratching my head on this for months now.
May 18, 2007 at 9:11 am
Hmm. Need to start reaching here.
Try enabling TIP. Reboot and test.
How did you validate no firewall problem?
Try specifying an alias for the linked server with specific TCP/IP address and set up linked server to that. Perhaps some wierd name resolution issue can be worked around by that kludge.
Try named pipes as above.
Do BOTH machines have the same DTC configurations and have both been rebooted since DTC changes were made?
Can you do dist tran in the reverse direction?
If these things don't work, I'm fresh out. I have had similar problems (one of them just yesterday actually) and what I have covered prior to this post worked. I DO know your frustrations though!! Biggest thing was that a reboot was required after any DTC config change it seemed.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
May 18, 2007 at 9:22 am
cheers for the help, The machines have been tested without firewall. Also, I have read this in microsoft website:
Before the release of Windows XP and Windows Server 2003, the TIP service, by default, listened on a fixed port, which made the DTC vulnerable to attack on that port, introducing an unwanted security risk. In Windows XP and Windows Server 2003, the TIP service is turned off by default, helping reduce the risk of attack on the TIP port.
I cant think of a reason why this setting would help so I haven't in the past. The Servers are very much 'live' and would need a really good reason to re-boot making the task a tad harder.
I see the point with the linked server alias. That could be an Idea.
October 31, 2007 at 2:53 am
Hi guys!
Were you able to solve this problem? I'm using Windows XP SP2 and SQL Server 2000 and both are installed in one pc. Oracle8i is installed on a Unix box. I also tried the different suggestions in microsoft and other db forums but still the same error. I access the linked server thru a View Table. In Query Analyzer, performing a select in the view table works fine but when I access the view table in my application, the problem occurs. The weird thing is that the error only occurs on the first access then works on 2nd access. Any idea?
TIA!
November 7, 2007 at 12:29 pm
The settings I have are for the MSDTC are as follows:
Network DTC Access
Allow Remote Clients
Allow Remote Admin
Allow Inbound
Allow Outbound
No Authentication Required
Enable XA Transactions
I have the same problem. But I don't have all these options on my "Security Configuration" tab. I have
Network DTC Access (checked)
-- Network Administration (checked)
-- Network Transactions (checked)
-- Network Clients (checked)
-- TIP (not checked)
XA Transactions (checked)
I can exec a query on my Server A that is linked to Server B and it works fine. When I wrap it in a "BEGIN DISTRIBUTED TRANSACTION" or "BEGIN TRANSACTION" then I get the error message. What's the real difference between doing it with the DISTRIBUTED keyword or not? Thanks for any ideas.
September 5, 2008 at 11:17 am
I have the same issue with an application that uses the JDBC driver to do an update on a database 2 by comparing two databases 1 & 2. Now, I grabbed the code from my application and tried to do the update then it errored out saying "MS SQL OLEDB could not begin Distributed Transaction' where as if I take out the subquery which is just a select statement it runs fine,also it actually uses the Linked Server fully qualified naming covention.
What has to be specified to make sure that UPDATE runs successfully atleast from my Workstation against two servers linked by a Linked server. I would appreciate an elaborate answer because I have browsed through all the KB articles on MS DTC issue ans also on error 7391.
Thanks!!
The_SQL_DBA
MCTS
"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."
October 30, 2008 at 2:23 am
I too am facing an error
"The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "XXX" was unable to being a distributed transaction
NOTE: This problem is only getting reproduced on virtual machines
The distributed transaction ain't the loopback transaction
Tried solutions:
1) Did tried msdtc security settings
2) Did reboot afterwards
Any recommendations? 🙂
November 24, 2008 at 8:48 am
That should sort you out
January 28, 2009 at 9:32 am
Enable Distributed COM on this Computer
January 28, 2009 at 9:35 am
Follow these steps:
a. Click Start, and then click Run.
b. In the Run dialog box, type dcomcnfg.exe, and then click OK.
c. In the Component Services window, expand Component Services, expand Computers, and then expand My Computer.
d. Right-click My Computer, and then click Properties.
e. In the My Computer Properties dialog box, click Default Properties tab.
f. In the Default Properties dialog box, click to Enable Distributed COM on this Computer check box.
July 27, 2011 at 11:16 am
Paresh Randeria (1/28/2009)
Follow these steps:a. Click Start, and then click Run.
b. In the Run dialog box, type dcomcnfg.exe, and then click OK.
c. In the Component Services window, expand Component Services, expand Computers, and then expand My Computer.
d. Right-click My Computer, and then click Properties.
e. In the My Computer Properties dialog box, click Default Properties tab.
f. In the Default Properties dialog box, click to Enable Distributed COM on this Computer check box.
g. The problem for me was that “Network DTC Access” option was not enabled on the ISSQLDW host DCOM settings
(dcomcnfg.exe?Component Services?My Computer?Properties?MSDTC?Security Configuration).
R
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply