Wednesday, March 28, 2012

Problem with SQL Server & MSDTC on Windows 2003 (dtctester.exe related)

Hi all
I am not sure if this is a Windows 2003 server problem or a SQL Server
problem so I am cross posting to both groups.
I have a new Dell server which is running Windows 2003 and is going to be a
development database server. I have SQL Server 2000 installed on it and i
can connect using the SQL client tools manipulate data on that server
without any problems.
The problem comes when I try and connect using an ODBC connection from
within an MTS/COM+ component. I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '8004d00a'
[Microsoft][ODBC SQL Server Driver]Distributed transaction error
While searching for a solution to this problem, I came across a Microsoft
utility (available from
http://support.microsoft.com/defaul...b;EN-US;Q293799) which has
helped me narrow this problem down to it not being my COM+ component because
when I try and run this tool I get the following output:
Executed: dtctester
DSN: <My DSN Name>
User Name: sa
Password: <My sa Password>
tablename= #dtc32294
Creating Temp Table for Testing: #dtc32294
Warning: No Columns in Result Set From Executing: 'create table #dtc32294
(ival int)'
Initializing DTC
Beginning DTC Transaction
Enlisting Connection in Transaction
Error:
SQLSTATE=25S12,Native error=-2147168219,msg='[Microsoft][ODBC SQL Se
rver
Driver]Distributed transaction error'
Error: SQLSTATE=24000,Native error=0,msg=[Microsoft][ODBC SQL Server
Driver]Invalid cur
sor 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 feeling is that it is specific to Windows 2003 because I can perform
exactly the same test using dtctester.exe to our old SQL server from the
same client and using the same ODBC DSN (with the server name changed of
course) and everything works without problems.
Thanks in advance for any help you can give,
DaveAdditional Information which I forgot to add in the original post.
In response to the suggestions the dtctester app gives me:
a. Firewall Has Ports Closed
- There is no firewall in between the two machines
b. Bad WINS/DNS entries
- These are fine and checked
c. Misconfigured network
- I can communicate with the server over everything apart from DTC
transactions
d. Misconfigured SQL Server machine that has multiple netcards.
- This is too vague to really know what they mean but I have disabled every
other network card in the machine so there is only one active local
connection.
"Dave Verwer" <d.verwer@.link-hrsystems.com> wrote in message
news:ObEBOsECEHA.684@.tk2msftngp13.phx.gbl...
> Hi all
> I am not sure if this is a Windows 2003 server problem or a SQL Server
> problem so I am cross posting to both groups.
> I have a new Dell server which is running Windows 2003 and is going to be
a
> development database server. I have SQL Server 2000 installed on it and i
> can connect using the SQL client tools manipulate data on that server
> without any problems.
> The problem comes when I try and connect using an ODBC connection from
> within an MTS/COM+ component. I get the following error:
> Microsoft OLE DB Provider for ODBC Drivers error '8004d00a'
> [Microsoft][ODBC SQL Server Driver]Distributed transaction error
> While searching for a solution to this problem, I came across a Microsoft
> utility (available from
> http://support.microsoft.com/defaul...b;EN-US;Q293799) which has
> helped me narrow this problem down to it not being my COM+ component
because
> when I try and run this tool I get the following output:
> Executed: dtctester
> DSN: <My DSN Name>
> User Name: sa
> Password: <My sa Password>
> tablename= #dtc32294
> Creating Temp Table for Testing: #dtc32294
> Warning: No Columns in Result Set From Executing: 'create table #dtc32294
> (ival int)'
> Initializing DTC
> Beginning DTC Transaction
> Enlisting Connection in Transaction
> Error:
> SQLSTATE=25S12,Native error=-2147168219,msg='[Microsoft][ODBC SQL
Server
> Driver]Distributed transaction error'
> Error: SQLSTATE=24000,Native error=0,msg=[Microsoft][ODBC SQL Serv
er
> Driver]Invalid cur
> sor 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 feeling is that it is specific to Windows 2003 because I can perform
> exactly the same test using dtctester.exe to our old SQL server from the
> same client and using the same ODBC DSN (with the server name changed of
> course) and everything works without problems.
> Thanks in advance for any help you can give,
> Dave
>|||Hi Dave,
Thanks for your post. If I understand correctly you got the following error
message when you tried and connect using an ODBC connection form within an
MTS/COM+ component.
Microsoft OLE DB Provider for ODBC Drivers error '8004d00a'
[Microsoft][ODBC SQL Server Driver]Distributed transaction error
Based on my research, by default, network DTC access is disabled on the
Windows Server 2003 products. When you do not enable network DTC access on
the server, applications can only use transactions that stay on the local
computer. Please try the suggestions in the following article and do not
forget to restart your computer after enabling network DTC access.
817064 HOW TO: Enable Network DTC Access in Windows Server 2003
http://support.microsoft.com/?id=817064
Please feel free to post in the group if this solves your problem or if you
would like further assistance on this issue.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Thanks for the reply
The database server did not have this option ticked so i ticked it and
rebooted it however i still get the same error using the dtctester
application.
Dave
""Yuan Shao"" wrote in message news:elofZuMCEHA.600@.cpmsftngxa06.phx.gbl...
> Hi Dave,
> Thanks for your post. If I understand correctly you got the following
error
> message when you tried and connect using an ODBC connection form within an
> MTS/COM+ component.
> Microsoft OLE DB Provider for ODBC Drivers error '8004d00a'
> [Microsoft][ODBC SQL Server Driver]Distributed transaction error
> Based on my research, by default, network DTC access is disabled on the
> Windows Server 2003 products. When you do not enable network DTC access on
> the server, applications can only use transactions that stay on the local
> computer. Please try the suggestions in the following article and do not
> forget to restart your computer after enabling network DTC access.
> 817064 HOW TO: Enable Network DTC Access in Windows Server 2003
> http://support.microsoft.com/?id=817064
> Please feel free to post in the group if this solves your problem or if
you
> would like further assistance on this issue.
> Regards,
> Michael Shao
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>|||Additional Information:
I tried the dtctester application from the database server itself and it
worked so this is definately a remote access DTC issue.
"Dave Verwer" <d.verwer@.link-hrsystems.com> wrote in message
news:%231n5tknCEHA.2600@.TK2MSFTNGP12.phx.gbl...
> Thanks for the reply
> The database server did not have this option ticked so i ticked it and
> rebooted it however i still get the same error using the dtctester
> application.
> Dave
>
> ""Yuan Shao"" wrote in message
news:elofZuMCEHA.600@.cpmsftngxa06.phx.gbl...
> error
an
on
local
> you
rights.
>|||Hi Dave,
Thanks for your feedback. Please check the following registry keys on your
windows 2003 server.
HKLM\Software\Microsoft\MSDTC\Security\N
etworkDTCAccess
NetworkDTCAccessAdmin
NetworkDTCAccessTransactions
Please set them to 1 to enable these registry key and restarted MSDTC & SQL
Server.
I am looking forward to hearing from you soon.
Sincerely,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Just to clarify, you want me to add a new Key under the
HKLM\Software\Microsoft\MSDTC\Security\ key called NetworkDTCAccess (this
key/folder does not exist on my server) and then add 2 DWORD values under
there called NetworkDTCAccessAdmin and NetworkDTCAccessTransactions and set
them both to value 1?
I am asking because i am not sure if you meant for the NetworkDTCAccess key
to already exist and if that signifies a more significant problem than we
are dealing with here.
""Yuan Shao"" <v-yshao@.online.microsoft.com> wrote in message
news:RWKN1twCEHA.2300@.cpmsftngxa06.phx.gbl...
> Hi Dave,
> Thanks for your feedback. Please check the following registry keys on your
> windows 2003 server.
> HKLM\Software\Microsoft\MSDTC\Security\N
etworkDTCAccess
> NetworkDTCAccessAdmin
> NetworkDTCAccessTransactions
> Please set them to 1 to enable these registry key and restarted MSDTC &
SQL
> Server.
> I am looking forward to hearing from you soon.
> Sincerely,
> Michael Shao
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>|||Hi Dave,
Thanks for your update. I apologize for my confusion. In left detail pane
of the HKLM\Software\Microsoft\MSDTC\Security\ folder, you are able to see
3 DWORD values (NetworkDTCAccess, NetworkDTCAccessAdmin and
NetworkDTCAccessTransactions), which exist on my windows 2003 computer.
Please make sure the values of them are 1.
I am looking forward to hearing from you soon.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.|||Hi Dave,
How is the issue going on your side? Let us know if you need further
assistance on this issue.
Regards,
Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.sql

No comments:

Post a Comment