Solved

SQL server 2008 Distributed transaction problem

Posted on 2009-05-19
10
5,653 Views
Last Modified: 2012-05-07
Code executed on the SQL 2008 server (Installed on Windows 2008 OS)
Insert into Temp table
Exec [sql 2005 server].Dbname.dbo.Spname  (SQL 2005 is installed on Windows 2003)

The Execute SP statement when executed alone runs fine, however when called with the Insert statement gives the following error

Server: Msg 7391, Level 16, State 2, Line 1
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "servername" was unable to begin a distributed transaction.
OLE DB provider "SQLNCLI10" for linked server "servername" returned message "No transaction is active.".

On both the servers the Ad Hoc Distributed Queries is enable @ sql level.
Windows level MS DTC remote service is running with no authentication on both the servers. The firewall is set to off. Also the linked server created has Data access, RPC in & RPC out set to true.

 

0
Comment
Question by:swapnil_mohile
[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
  • 5
  • 5
10 Comments
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24428990
Check whether MSDTC is configured as mentioned below:

http://support.microsoft.com/kb/839279

In SQL Server 2005, a bug was fixed for Linked Server connectivity in Service Pack 2.
Hence installing either SP2 or SP3 for that SQL Server 2005 machine is recommended to resolve this issue.

0
 

Author Comment

by:swapnil_mohile
ID: 24430987
On the SQL 2005 server SP2 is already installed
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24431379
Can you confirm whether this one was working:

select * from [sql 2005 server].Dbname.dbo.Spname

If it is then

begin distributed tran
select * from [sql 2005 server].Dbname.dbo.Spname
commit tran

If second query is not working, then kindly provide the error message so that we can fix it out.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

Author Comment

by:swapnil_mohile
ID: 24438823
SPname here stands for Stored procedure name, so i have replaced the select with the execute command.

The first query runs fine, while running the second query the same error is encountered as mentioned in the above problem

Server: Msg 7391, Level 16, State 2, Line 2
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "servername" was unable to begin a distributed transaction.
OLE DB provider "SQLNCLI10" for linked server "servername" returned message "No transaction is active.".
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24439068
Have you configured Steps 1 and 2 in Workaround mentioned in the link below:

http://support.microsoft.com/kb/839279

This is the same link which I mentioned above. If the second one works that means that MSDTC is configured properly, otherwise it is not.

Restart your 2003 machine for these changes to come into effect.
0
 

Author Comment

by:swapnil_mohile
ID: 24439643
This is already configured as mentioned earlier. I get the error only when the insert statement statement is executed from sql server 2008 (windows 2008).

When the same query is executed from any sql 2005 the same works fine.
0
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 24440006
If it not working out from SQL Server 2008 on windows 2008, kindly check whether MSDTC is configured properly in this machine as per

http://itknowledgeexchange.techtarget.com/sql-server/how-to-configure-dtc-on-windows-2008/

Kindly check this out
0
 

Author Comment

by:swapnil_mohile
ID: 24448199
While installing the Application server got the following warning

could not enable the distributed transaction coordinator firewall rule

The windows firewall was off while installing the application server

The DTC was already configured. After restarting the DTC service the event log looks like below

MSDTC started with the following settings:

 Security Configuration (OFF = 0 and ON = 1):
 Allow Remote Administrator = 0,
 Network Clients = 1,
 Trasaction Manager Communication:
 Allow Inbound Transactions = 1,
 Allow Outbound Transactions = 1,
 Transaction Internet Protocol (TIP) = 1,
  Enable XA Transactions = 1,
  MSDTC Communications Security = No Authentication Required,
 Account = NT AUTHORITY\NetworkService,
  Firewall Exclusion Detected = 0

 Transaction Bridge Installed = 0
 Filtering Duplicate Events = 1


Am still getting the same error after configuring the mentioned steps
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24449188
Enable Windows Firewall, Configure it as mentioned in the link and then Disable Windows Firewall.
Give it a try and might help.
0
 

Author Comment

by:swapnil_mohile
ID: 24466027
Thanks the issue is reolsved
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

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.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

691 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