I have an C# EnterpriseService component that is part of an application I am
developing that is responsible for writing data to an SQL Server. (it reads
from a local DB (MSDE), then writes to a 'remote' DB (SQL Server 2k)...) On
some machines I get the following exception:
System.InvalidOperationException: An error occurred while enlisting in a
distributed transaction.
at
System.Data.SqlClient.SqlInternalConnection.EnlistNonNullDistributedTransact
ion(ITransaction transaction)
at
System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction(ITr
ansaction newTransaction, Guid newTransactionGuid)
at
System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction()
at System.Data.SqlClient.SqlInternalConnection.Activate(Boolean
isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at [The method making the call]
More Info:
- The problem host machines are running Windows 2000 Pro, and the remote
machines are running Win2k Pro, or Server. I get the same exception
regardless of the server machine OS (pro or server) and I have another Win2k
Pro machine working fine.
- The ES Component is set to Require transactions. (it works if we set
transactions to disabled, but we need the transactions)
- One of the problem host machines it behind a NAT router, and is not on the
domain with the remote sql server. (This should work...)
- The other problem host machine is on the same domain.
- When either of the host machines is setup as a server machine (meaning
that it is pointed to as a remote DB) it does NOT work, I get the same
exception from the other end.
Thanks in advance,
Don Riesbeck Jr."Aaron Weiker" <aaron@.sqlprogrammer.org> wrote in message
news:ewoPbJsDFHA.1564@.TK2MSFTNGP09.phx.gbl...
> Don Riesbeck Jr. wrote:
System.Data.SqlClient.SqlInternalConnection. EnlistNonNullDistributedTransact[color=d
arkred]
System.Data.SqlClient.SqlInternalConnection. EnlistDistributedTransaction(ITr[color=d
arkred]
System.Data.SqlClient.SqlInternalConnection. EnlistDistributedTransaction()[color=dar
kred]
> Make sure that the DTC service is running when you try to do this.
> --
> Aaron Weiker
> http://aaronweiker.com/
> http://www.sqlprogrammer.org/
That was the first think I checked.
Thanks|||I should probably state that Both SQL Server and MSDTC are installed and
started on ALL machines.
"Don Riesbeck Jr." <0207053pm-replyingroup@.nerdlycrap.com> wrote in message
news:e6wd3GsDFHA.1012@.TK2MSFTNGP14.phx.gbl...
> I have an C# EnterpriseService component that is part of an application I
am
> developing that is responsible for writing data to an SQL Server. (it
reads
> from a local DB (MSDE), then writes to a 'remote' DB (SQL Server 2k)...)
On
> some machines I get the following exception:
> System.InvalidOperationException: An error occurred while enlisting in a
> distributed transaction.
> at
>
System.Data.SqlClient.SqlInternalConnection. EnlistNonNullDistributedTransactarkred">
> ion(ITransaction transaction)
> at
>
System.Data.SqlClient.SqlInternalConnection. EnlistDistributedTransaction(ITrarkred">
> ansaction newTransaction, Guid newTransactionGuid)
> at
> System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction()
> at System.Data.SqlClient.SqlInternalConnection.Activate(Boolean
> isInTransaction)
> at System.Data.SqlClient.SqlConnection.Open()
> at [The method making the call]
> More Info:
> - The problem host machines are running Windows 2000 Pro, and the remote
> machines are running Win2k Pro, or Server. I get the same exception
> regardless of the server machine OS (pro or server) and I have another
Win2k
> Pro machine working fine.
> - The ES Component is set to Require transactions. (it works if we set
> transactions to disabled, but we need the transactions)
> - One of the problem host machines it behind a NAT router, and is not on
the
> domain with the remote sql server. (This should work...)
> - The other problem host machine is on the same domain.
> - When either of the host machines is setup as a server machine (meaning
> that it is pointed to as a remote DB) it does NOT work, I get the same
> exception from the other end.
>
> Thanks in advance,
> Don Riesbeck Jr.
>|||surely if the remote SQL Server is not on the same domain you are going to
have to setup a trust relationship between the 2 boxes
HTH
Ollie Riches
"Don Riesbeck Jr." <0207053pm-replyingroup@.nerdlycrap.com> wrote in message
news:e6wd3GsDFHA.1012@.TK2MSFTNGP14.phx.gbl...
> I have an C# EnterpriseService component that is part of an application I
am
> developing that is responsible for writing data to an SQL Server. (it
reads
> from a local DB (MSDE), then writes to a 'remote' DB (SQL Server 2k)...)
On
> some machines I get the following exception:
> System.InvalidOperationException: An error occurred while enlisting in a
> distributed transaction.
> at
>
System.Data.SqlClient.SqlInternalConnection. EnlistNonNullDistributedTransactarkred">
> ion(ITransaction transaction)
> at
>
System.Data.SqlClient.SqlInternalConnection. EnlistDistributedTransaction(ITrarkred">
> ansaction newTransaction, Guid newTransactionGuid)
> at
> System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction()
> at System.Data.SqlClient.SqlInternalConnection.Activate(Boolean
> isInTransaction)
> at System.Data.SqlClient.SqlConnection.Open()
> at [The method making the call]
> More Info:
> - The problem host machines are running Windows 2000 Pro, and the remote
> machines are running Win2k Pro, or Server. I get the same exception
> regardless of the server machine OS (pro or server) and I have another
Win2k
> Pro machine working fine.
> - The ES Component is set to Require transactions. (it works if we set
> transactions to disabled, but we need the transactions)
> - One of the problem host machines it behind a NAT router, and is not on
the
> domain with the remote sql server. (This should work...)
> - The other problem host machine is on the same domain.
> - When either of the host machines is setup as a server machine (meaning
> that it is pointed to as a remote DB) it does NOT work, I get the same
> exception from the other end.
>
> Thanks in advance,
> Don Riesbeck Jr.
>|||Don,
If you right click on the computer icon in Component Services, you
should be able to get the property pages for the machine. One of the tabs
is MSDTC. There is a button for security settings on that machine. I
believe you have to make sure that the machine can allow incoming
transactions to be flowed through the system.
XP SP2 automatically shuts these off for you, so that you can't enlist
in distributed transactions. I believe the recent SP for W2K does this as
well. That is the first thing I would check though.
Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mvp@.spam.guard.caspershouse.com
"Don Riesbeck Jr." <0207053pm-replyingroup@.nerdlycrap.com> wrote in message
news:e6wd3GsDFHA.1012@.TK2MSFTNGP14.phx.gbl...
>I have an C# EnterpriseService component that is part of an application I
>am
> developing that is responsible for writing data to an SQL Server. (it
> reads
> from a local DB (MSDE), then writes to a 'remote' DB (SQL Server 2k)...)
> On
> some machines I get the following exception:
> System.InvalidOperationException: An error occurred while enlisting in a
> distributed transaction.
> at
> System.Data.SqlClient.SqlInternalConnection.EnlistNonNullDistributedTransa
ct
> ion(ITransaction transaction)
> at
> System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction(I
Tr
> ansaction newTransaction, Guid newTransactionGuid)
> at
> System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction()
> at System.Data.SqlClient.SqlInternalConnection.Activate(Boolean
> isInTransaction)
> at System.Data.SqlClient.SqlConnection.Open()
> at [The method making the call]
> More Info:
> - The problem host machines are running Windows 2000 Pro, and the remote
> machines are running Win2k Pro, or Server. I get the same exception
> regardless of the server machine OS (pro or server) and I have another
> Win2k
> Pro machine working fine.
> - The ES Component is set to Require transactions. (it works if we set
> transactions to disabled, but we need the transactions)
> - One of the problem host machines it behind a NAT router, and is not on
> the
> domain with the remote sql server. (This should work...)
> - The other problem host machine is on the same domain.
> - When either of the host machines is setup as a server machine (meaning
> that it is pointed to as a remote DB) it does NOT work, I get the same
> exception from the other end.
>
> Thanks in advance,
> Don Riesbeck Jr.
>|||Nicholas,
I looked under the Component Services -> My Computer Properties, but I don't
see a security button under the MSDTC tab just a coordinator section, log,
protocol config, and a service control section. There is a Default Security
tab which I added 'EVERYONE' too for both access, and launch. But that
didn't fix the problem, I still get the same exception.
We havn't seen this problem with Windows 2k server, is there any significant
(in the context of transactions) between Server and Pro?
Thanks,
Don
"Nicholas Paldino [.NET/C# MVP]" <mvp@.spam.guard.caspershouse.com> wrote in
message news:unHRjWsDFHA.3732@.TK2MSFTNGP14.phx.gbl...
> Don,
> If you right click on the computer icon in Component Services, you
> should be able to get the property pages for the machine. One of the tabs
> is MSDTC. There is a button for security settings on that machine. I
> believe you have to make sure that the machine can allow incoming
> transactions to be flowed through the system.
> XP SP2 automatically shuts these off for you, so that you can't enlist
> in distributed transactions. I believe the recent SP for W2K does this as
> well. That is the first thing I would check though.
> Hope this helps.
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@.spam.guard.caspershouse.com
>
> "Don Riesbeck Jr." <0207053pm-replyingroup@.nerdlycrap.com> wrote in
message
> news:e6wd3GsDFHA.1012@.TK2MSFTNGP14.phx.gbl...
System.Data.SqlClient.SqlInternalConnection. EnlistNonNullDistributedTransact[color=d
arkred]
System.Data.SqlClient.SqlInternalConnection. EnlistDistributedTransaction(ITr[color=d
arkred]
System.Data.SqlClient.SqlInternalConnection. EnlistDistributedTransaction()[color=dar
kred]
>|||I have abut the same problem. it works on 4 machines (XP pro + SP2),
and it doesn't work on other 3 machines. On one of them it gives a
security error, on another one it gives a "Error enlisting in
distributed...". I tryed everything that I could find on the net, no
luck.
One 3rd bad machine (W2003) is not on the same domain. How do I create
a trust relation ship between them?
thanks,
florinsql
Monday, March 26, 2012
EnterpriseService Component: problem enlisting in a distributed transaction
Labels:
amdeveloping,
application,
component,
database,
distributed,
enlisting,
enterpriseservice,
microsoft,
mysql,
oracle,
responsible,
server,
sql,
transaction,
writing
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment