|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MS DTC problem
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 We ran into these problems when we had data layer COM components
located on a Windows 2000 server and our SQL Server 2000 running on Server 2003 SP1. SP1 upgrades the MSDTC to attempt mutual authentication, of which older MSDTC clients are not compatible. Don't know if the settings are the same, Go to Control Panel - Admin tools - Component Services. Expand Component Services, right click on My Computer. Go to the MSDTC tab - hit Security Configuration (at the bottom right) check Network DTC access, then adjust the other settings to what you are trying to do (allow inbound or outbound probably) Also have to set it to No Authentication in order to connect to the Win 2K DTC. Hope this helps.. --Bill PSPDBA On Mar 16, 7:06 am, chris.hear***@googlemail.com wrote: Show quoteHide quote > 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 Forgot to mention that you need the changes on the XP SP2 machine, not
the SQL server box... Show quoteHide quote On Mar 16, 8:30 am, "PSPDBA" <Dissendium***@gmail.com> wrote: > We ran into these problems when we had data layer COM components > located on a Windows 2000 server and our SQL Server 2000 running on > Server 2003 SP1. SP1 upgrades the MSDTC to attempt mutual > authentication, of which older MSDTC clients are not compatible. > Don't know if the settings are the same, > > Go to Control Panel - Admin tools - Component Services. Expand > Component Services, right click on My Computer. Go to the MSDTC tab - > hit Security Configuration (at the bottom right) check Network DTC > access, then adjust the other settings to what you are trying to do > (allow inbound or outbound probably) Also have to set it to No > Authentication in order to connect to the Win 2K DTC. > > Hope this helps.. > > --Bill > PSPDBA > Thanks very much for that. I now have this working, but I really wish
I knew why :( During my initial testing last week I did try setting the Security Configuration | Transaction Manager Communication to all three options and the DTC error persisted. However, after reading the above I thought "Oh well, maybe selecting properties on the 'My Computer' icon might work differently to clicking the 'Configure My Computer' icon in the toolbar.". So I tried it and lo and behold it worked! So I'm very happy but I'm also really annoyed about it. I can now get this to fail by setting it to Mutual Authentication and fix it by reverting to Incoming Caller Authentication. And the route to opening the properties, of course, makes no difference. So, how come all is well today when it refused to work last week? All that's happened since then is my client has been rebooted. Was that the magic ingredient? Or maybe it was the weekend off that did it. <sigh> To quote a wise old owl (and show my age)
"How many licks does it take to get to the center of a tootsie pop?" "One...Two...Three.......Three" On Mar 20, 1:12 pm, chris.hear***@googlemail.com wrote: Show quoteHide quote > Thanks very much for that. I now have this working, but I really wish > I knew why :( > > During my initial testing last week I did try setting the Security > Configuration | Transaction Manager Communication to all three options > and the DTC error persisted. However, after reading the above I > thought "Oh well, maybe selecting properties on the 'My Computer' icon > might work differently to clicking the 'Configure My Computer' icon in > the toolbar.". So I tried it and lo and behold it worked! So I'm > very happy but I'm also really annoyed about it. I can now get this > to fail by setting it to Mutual Authentication and fix it by reverting > to Incoming Caller Authentication. And the route to opening the > properties, of course, makes no difference. So, how come all is well > today when it refused to work last week? All that's happened since > then is my client has been rebooted. Was that the magic ingredient? > Or maybe it was the weekend off that did it. <sigh>
Other interesting topics
SQL Server 2005 - Generate Script
Insert Duplicate row in Temp Table Large database - unable to delete even 10 rows? Deferred Name Resolution gone wild. SQL Server Backup and Transactions How to avoid creating duplicate indexes on the same column Table size SQL Server 2005 compact edition with VB Restore Failure OS Related ? SQLH2 |
|||||||||||||||||||||||