MS DTC problem



Hi,

I've seen this problem posted before but never a solution. I have
a .Net app that uses an ODBC connection to a SQL Server 2000 database
(running on W2kSP4). Trying to enlist in a transaction fails with the
following exception:

OdbcException: "ERROR [25S12] [Microsoft][ODBC SQL Server
Driver]Distributed transaction error"

My first port of call was DTCTester, which gave me the following
output:

Executed: C:\Temp\dtctester.exe
DSN: teleware
User Name: <domain>\<username>
Password: <pwd>
tablename= #dtc3608
Creating Temp Table for Testing: #dtc3608
Warning: No Columns in Result Set From Executing: 'create table
#dtc3608 (ival int)'
Initializing DTC
Beginning DTC Transaction
Enlisting Connection in Transaction
Error:
SQLSTATE=25S12,Native error=-2147168242,msg='[Microsoft][ODBC SQL
Server Driver]Distributed transaction error'
Error:
SQLSTATE=24000,Native error=0,msg=[Microsoft][ODBC SQL Server
Driver]Invalid cursor state
Typical Errors in DTC Output When
a. Firewall Has Ports Closed
-OR-
b. Bad WINS/DNS entries
-OR-
c. Misconfigured network
-OR-
d. Misconfigured SQL Server machine that has multiple netcards.
Aborting DTC Transaction
Releasing DTC Interface Pointers
Successfully Released pTransaction Pointer.

My client is Windows XP SP2, Windows firewall is turned off and
Network DTC Access is enabled with Allow Outbound and No
Authentication Required selected on MSDTC Security Configuration.

First I made sure I could ping both ways using machine name and IP
address, all successful. I next tried DTCPing, which gave me the
following information:

Client side output:

Platform:Windows XP
IP Configure Information
Host Name . . . . . . . . . : 10.1.**.**
DNS Servers . . . . . . . . : 10.1.**.**
10.1.**.**
Node Type . . . . . . . . . : Hybrid
NetBIOS Scope ID. . . . . . :
IP Routing Enabled. . . . . : no
WINS Proxy Enabled. . . . . : no
NetBIOS Resolution Uses DNS : no

Ethernet adapter {F3AB3CF4-E1E9-4E5E-9217-6E1A9EF157AF}:

Description . . . . . . . . : Intel 8255x-based PCI Ethernet Adapter
(10/100) - Packet Scheduler Miniport
Physical Address. . . . . . : 00-00-39-06-F8-B8
DHCP Enabled. . . . . . . . : yes
IP Address. . . . . . . . . : 10.1.**.**
Subnet Mask . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . : 10.1.**.**
DHCP Server . . . . . . . . : 10.1.**.**
Primary WINS Server . . . . : 10.1.**.**
Secondary WINS Server . . . : 0.0.0.0
Lease Obtained. . . . . . . : Fri Mar 16 10:11:02 2007
Lease Expires . . . . . . . : Mon Mar 19 10:11:02 2007

++++++++++++lmhosts.sam++++++++++++

++++++++++++hosts ++++++++++++
127.0.0.1 localhost

++++++++++++++++++++++++++++++++++++++++++++++
DTCping 1.9 Report for
++++++++++++++++++++++++++++++++++++++++++++++
RPC server is ready
++++++++++++Validating Remote Computer Name++++++++++++
03-16, 10:15:04.849-->Start DTC connection test
Name Resolution:
dev-sql-->10.1.**.**-->dev-sql.***.co.uk
03-16, 10:15:04.859-->Start RPC test (-->dev-sql)
RPC test is successful
Partner's CID:034B477D-7C3E-4FC8-AE2F-DAC7F503FB51
++++++++++++RPC test completed+++++++++++++++
++++++++++++Start DTC Binding Test +++++++++++++
Trying Bind to dev-sql
03-16, 10:15:04.939--> Initiating DTC Binding Test....
Test Guid:6D422B2D-4E86-42D5-9AE3-5410FF0EF62A
Binding success: -->dev-sql
++++++++++++DTC Binding Test END+++++++++++++


==========================

Server-side output:

Platform:Windows 2000
IP Configure Information
Host Name . . . . . . . . . : dev-sql
DNS Servers . . . . . . . . : 10.1.**.**
10.1.**.**
Node Type . . . . . . . . . : Hybrid
NetBIOS Scope ID. . . . . . :
IP Routing Enabled. . . . . : no
WINS Proxy Enabled. . . . . : no
NetBIOS Resolution Uses DNS : no

Ethernet adapter {A78CB6A6-ED55-4B31-818B-92C3ECAAFE68}:

Description . . . . . . . . : NETGEAR FA310TX Fast Ethernet PCI
Adapter
Physical Address. . . . . . : 00-A0-CC-64-83-1F
DHCP Enabled. . . . . . . . : no
IP Address. . . . . . . . . : 10.1.**.**
Subnet Mask . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . : 10.1.**.**
DHCP Server . . . . . . . . : 255.255.255.255
Primary WINS Server . . . . : 0.0.0.0
Secondary WINS Server . . . : 0.0.0.0
Lease Obtained. . . . . . . : Thu Jan 01 00:00:00 1970
Lease Expires . . . . . . . : Thu Jan 01 00:00:00 1970

++++++++++++lmhosts.sam++++++++++++

++++++++++++hosts ++++++++++++
127.0.0.1 localhost

++++++++++++++++++++++++++++++++++++++++++++++
DTCping 1.9 Report for DEV-SQL
++++++++++++++++++++++++++++++++++++++++++++++
RPC server is ready
03-16, 09:57:37.298-->RPC server:DEV-SQL received following
information:
Network Name: dev-sql.***.co.uk
Source Port: 2940
Partner LOG: 2852.log
Partner CID: 6D422B2D-4E86-42D5-9AE3-5410FF0EF62A
++++++++++++Start Reverse Bind Test+++++++++++++
Received Bind call from
Network Name: dev-sql.***.co.uk
Source Port: 2940
Hosting Machine:DEV-SQL
03-16, 09:57:37.609-->Trying to Reverse Bind to ...
Test Guid:6D422B2D-4E86-42D5-9AE3-5410FF0EF62A
Name Resolution:
-->10.1.**.**-->dev-sql.***.co.uk
Received reverse bind call from
Network Name: dev-sql.***.co.uk
Source Port: 2940
Hosting Machine:DEV-SQL
Reverse Binding success: DEV-SQL-->
++++++++++++Reverse Bind Test ENDED++++++++++
03-16, 09:57:38.109-->Called POKE from Partner:
Network Name: dev-sql.***.co.uk
Source Port: 2940
Hosting Machine:DEV-SQL
++++++++++++Validating Remote Computer Name++++++++++++
03-16, 09:57:39.491-->Start DTC connection test
Name Resolution:
teleware-nfj77t-->10.1.**.**-->teleware-nfj77t.***.co.uk
03-16, 09:57:39.581-->Start RPC test (DEV-SQL-->teleware-nfj77t)
WARNING:the CID values for both test machines are the same
while this problem won't stop DTCping test, MSDTC will fail for this
03-16, 09:57:39.591-->RPC server:DEV-SQL received following
information:
Network Name: dev-sql.***.co.uk
Source Port: 2940
Partner LOG: DEV-SQL3144.log
Partner CID: 034B477D-7C3E-4FC8-AE2F-DAC7F503FB51
RPC test is successful
Partner's CID:034B477D-7C3E-4FC8-AE2F-DAC7F503FB51
++++++++++++RPC test completed+++++++++++++++
++++++++++++Start DTC Binding Test +++++++++++++
Trying Bind to DEV-SQL
03-16, 09:57:39.781-->DEV-SQL Initiating DTC Binding Test....
Test Guid:034B477D-7C3E-4FC8-AE2F-DAC7F503FB51
++++++++++++Start Reverse Bind Test+++++++++++++
Received Bind call from DEV-SQL
Network Name: dev-sql.***.co.uk
Source Port: 2940
Hosting Machine:DEV-SQL
03-16, 09:57:40.022-->Trying to Reverse Bind to DEV-SQL...
Test Guid:034B477D-7C3E-4FC8-AE2F-DAC7F503FB51
Name Resolution:
DEV-SQL-->10.1.**.**-->dev-sql.***.co.uk
Received reverse bind call from DEV-SQL
Network Name: dev-sql.***.co.uk
Source Port: 2940
Hosting Machine:DEV-SQL
Reverse Binding success: DEV-SQL-->DEV-SQL
++++++++++++Reverse Bind Test ENDED++++++++++
Binding success: DEV-SQL-->DEV-SQL
++++++++++++DTC Binding Test END+++++++++++++


======================

The important bit here is the line:
WARNING:the CID values for both test machines are the same
while this problem won't stop DTCping test, MSDTC will fail for this

However, I checked the GUIDs in the registry on the client and server
and they do not appear to be the same. I was also a little confused
by the above, as the log firstly says:

Partner CID: 6D422B2D-4E86-42D5-9AE3-5410FF0EF62A

and a bit further down (after reporting the problem) it says:

Partner CID: 034B477D-7C3E-4FC8-AE2F-DAC7F503FB51

I checked the respective registries and the client's MSDTC GUID is
6D422B2D-4E86-42D5-9AE3-5410FF0EF62A and the server's is
034B477D-7C3E-4FC8-AE2F-DAC7F503FB51.

KB article 306843 has a suggestion for when the GUIDs are the same,
but not for when they are different. The client is definitely not a
ghost build of the server.

I can find no other useful information about this problem - a few have
asked in the past but their answers seem to consist of KB and blog
links, all of which I've read and not found useful.

I should also point out (and I guess you won't be surprised to hear)
that the same application (as well as the DTCPing test) runs correctly
on a couple of other client machines, one of which is also XP SP2 with
the same MS DTC settings as my problem client.

I feel this must a client configuration issue, but what? If anyone
else has had and fixed this problem, or has any ideas on what I can
try next, I'd be extremely pleased to hear from you.

Thanks,
Chris

.



Relevant Pages

  • omniOrb server + java client
    ... virtual char* echoString; ... // Bind the context to root. ... I start this server and if I try to test with c++ client, ...
    (comp.object.corba)
  • Re: using Socket calls in OSdesign subproject
    ... You don't want to restrict your bind(). ... correctly, the client is trying to connect to the wrong IP or, if the client ... Is there any way to check which IP address the server binds to when i use ... It comes to the level of accpeting socket and blocks there. ...
    (microsoft.public.windowsce.app.development)
  • MS DTC problem
    ... Server Driver]Distributed transaction error' ... Client side output: ... Source Port: 2940 ... Received Bind call from ...
    (microsoft.public.dotnet.distributed_apps)
  • (part 41) Han from China answers your C questions
    ... Unable to bind a 2nd time if recv receives all bytes sent ... I have written these very simple server and client, ... I, like Martien Verbruggen, am not a comp.lang.c network programming ...
    (comp.lang.c)
  • Re: uk pool problem
    ... there's some kind of firewall between the test system and the NTP server ... possible to have ntpdate use source port 123 without setting the clock. ... ntpd reference server implementation does not enforce that. ... between an ntpd server requesting time and a client requesting time via ...
    (comp.protocols.time.ntp)