473,769 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

EnterpriseServi ce Component: problem enlisting in a distributed transaction

I have an C# EnterpriseServi ce 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.InvalidO perationExcepti on: An error occurred while enlisting in a
distributed transaction.
at
System.Data.Sql Client.SqlInter nalConnection.E nlistNonNullDis tributedTransac t
ion(ITransactio n transaction)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction(IT r
ansaction newTransaction, Guid newTransactionG uid)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction()
at System.Data.Sql Client.SqlInter nalConnection.A ctivate(Boolean
isInTransaction )
at System.Data.Sql Client.SqlConne ction.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.
Nov 16 '05 #1
8 4369
Don Riesbeck Jr. wrote:
System.InvalidO perationExcepti on: An error occurred while enlisting in a
distributed transaction.
at
System.Data.Sql Client.SqlInter nalConnection.E nlistNonNullDis tributedTransac t
ion(ITransactio n transaction)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction(IT r
ansaction newTransaction, Guid newTransactionG uid)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction()
at System.Data.Sql Client.SqlInter nalConnection.A ctivate(Boolean
isInTransaction )
at System.Data.Sql Client.SqlConne ction.Open()
at [The method making the call]


Make sure that the DTC service is running when you try to do this.

--
Aaron Weiker
http://aaronweiker.com/
http://www.sqlprogrammer.org/
Nov 16 '05 #2

"Aaron Weiker" <aa***@sqlprogr ammer.org> wrote in message
news:ew******** ******@TK2MSFTN GP09.phx.gbl...
Don Riesbeck Jr. wrote:
System.InvalidO perationExcepti on: An error occurred while enlisting in a
distributed transaction.
at
System.Data.Sql Client.SqlInter nalConnection.E nlistNonNullDis tributedTransac t ion(ITransactio n transaction)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction(IT r ansaction newTransaction, Guid newTransactionG uid)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction() at System.Data.Sql Client.SqlInter nalConnection.A ctivate(Boolean
isInTransaction )
at System.Data.Sql Client.SqlConne ction.Open()
at [The method making the call]


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
Nov 16 '05 #3
Check that every machine has MS DTC (Microsoft Distributed Transaction
coordinator) installed and the service has started.
AMB

"Don Riesbeck Jr." wrote:
I have an C# EnterpriseServi ce 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.InvalidO perationExcepti on: An error occurred while enlisting in a
distributed transaction.
at
System.Data.Sql Client.SqlInter nalConnection.E nlistNonNullDis tributedTransac t
ion(ITransactio n transaction)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction(IT r
ansaction newTransaction, Guid newTransactionG uid)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction()
at System.Data.Sql Client.SqlInter nalConnection.A ctivate(Boolean
isInTransaction )
at System.Data.Sql Client.SqlConne ction.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.

Nov 16 '05 #4
I should probably state that Both SQL Server and MSDTC are installed and
started on ALL machines.

"Don Riesbeck Jr." <02************ ********@nerdly crap.com> wrote in message
news:e6******** ******@TK2MSFTN GP14.phx.gbl...
I have an C# EnterpriseServi ce 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.InvalidO perationExcepti on: An error occurred while enlisting in a
distributed transaction.
at
System.Data.Sql Client.SqlInter nalConnection.E nlistNonNullDis tributedTransac t ion(ITransactio n transaction)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction(IT r ansaction newTransaction, Guid newTransactionG uid)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction()
at System.Data.Sql Client.SqlInter nalConnection.A ctivate(Boolean
isInTransaction )
at System.Data.Sql Client.SqlConne ction.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.

Nov 16 '05 #5
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." <02************ ********@nerdly crap.com> wrote in message
news:e6******** ******@TK2MSFTN GP14.phx.gbl...
I have an C# EnterpriseServi ce 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.InvalidO perationExcepti on: An error occurred while enlisting in a
distributed transaction.
at
System.Data.Sql Client.SqlInter nalConnection.E nlistNonNullDis tributedTransac t ion(ITransactio n transaction)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction(IT r ansaction newTransaction, Guid newTransactionG uid)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction()
at System.Data.Sql Client.SqlInter nalConnection.A ctivate(Boolean
isInTransaction )
at System.Data.Sql Client.SqlConne ction.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.

Nov 16 '05 #6
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]
- mv*@spam.guard. caspershouse.co m
"Don Riesbeck Jr." <02************ ********@nerdly crap.com> wrote in message
news:e6******** ******@TK2MSFTN GP14.phx.gbl...
I have an C# EnterpriseServi ce 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.InvalidO perationExcepti on: An error occurred while enlisting in a
distributed transaction.
at
System.Data.Sql Client.SqlInter nalConnection.E nlistNonNullDis tributedTransac t
ion(ITransactio n transaction)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction(IT r
ansaction newTransaction, Guid newTransactionG uid)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction()
at System.Data.Sql Client.SqlInter nalConnection.A ctivate(Boolean
isInTransaction )
at System.Data.Sql Client.SqlConne ction.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.

Nov 16 '05 #7
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]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:un******** ******@TK2MSFTN GP14.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]
- mv*@spam.guard. caspershouse.co m
"Don Riesbeck Jr." <02************ ********@nerdly crap.com> wrote in message news:e6******** ******@TK2MSFTN GP14.phx.gbl...
I have an C# EnterpriseServi ce 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.InvalidO perationExcepti on: An error occurred while enlisting in a
distributed transaction.
at
System.Data.Sql Client.SqlInter nalConnection.E nlistNonNullDis tributedTransac t ion(ITransactio n transaction)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction(IT r ansaction newTransaction, Guid newTransactionG uid)
at
System.Data.Sql Client.SqlInter nalConnection.E nlistDistribute dTransaction() at System.Data.Sql Client.SqlInter nalConnection.A ctivate(Boolean
isInTransaction )
at System.Data.Sql Client.SqlConne ction.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.


Nov 16 '05 #8
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,
florin
Nov 16 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
18488
by: Steve Thorpe | last post by:
Hi have have two linked SQL Servers and I am trying to get things working smootly/quickly. Should I be using 'BEGIN TRANSACTION' or 'BEGIN DISTRIBUTED TRANSACTION' ? Basicly, these SPs update a local table and a remote table in the same transaction. I cant have one table updated and not the other. Please dont say replicate the tables either as at this time, this is is not an option. I have for example a number of stored procedures...
1
439
by: Avanish Pandey | last post by:
Hello All We have 3 differen services (in 3 different server) Service A,B,C . We want to implement distributed transaction when call methods of B and C from A. Is it possible? if yes then how? I have read the doc regarding this: http://www.developer.com/net/asp/article.php/3385631 but it will not work when methods are in different services on
2
2931
by: Jo Siffert | last post by:
Hi all, I would like to perform an INSERT INTO LINKEDSVR.dbo.xyz.abc SELECT ... FROM dbo.dfg where LINKEDSVR is a linked server on another machine. Both servers are running SQLServer 2000 and have the DTC running. When I run this batch from QueryAnalyzer without explicitly using
0
1690
by: Benjamin | last post by:
Hi! (Maybe this is not the optional Managed Newsgroup for this issue...?) We have problems after upgrading to Windows XP SP2 on our development machines. We have tried to follow the instructions here: http://support.microsoft.com/?kbid=899191
2
3896
by: John Lee | last post by:
Hi, I have few questions related to .NET 2.0 TransactionScope class behavior: 1. Check Transaction.Current.TransactionInformation.DistributedIdentifier to identify if distributed transaction is used - is it accurate way? 2. I have the following code blocks - In code block 1, the first check the DistributedIdentifier is ALL 0s so it
0
3019
by: gshawn3 | last post by:
Hi, I am having a hard time creating a Trigger to update an Oracle database. I am using a SQL Server 2005 Express database on a Win XP Pro SP2 desktop, linked to an Oracle 10g database on a remote Windows 2003 server. Both machines are on the same domain and very close physically (<1ms ping). I have set up the Oracle linked server in SQLEXPRESS, added the login/pw information, and I can execute select and update queries
0
2675
by: na | last post by:
My ASP.Net 2.0 web site has a Data.xsd schema. I just added a table adapter to the collection and configured it to use an existing SQL 2000 stored proc. When I tried to preview data from the table adapter, I got "SQLOLEDB was unable to begin a distributed transaction" error. The stored proc joins SQL 2000 tables via three linked servers. The stored proc is declared on Win2003Host. Two of the linked servers (Win2003A, Win2003B) running...
2
9255
by: rbg | last post by:
Hi, On My local SQL server I have added a linked server to another SQL server (remoteserver) in another Windows NT Domain. When I run this code select count(*) from remoteserver.mosaics.dbo.Location This works fine. However when I use
6
2531
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, In asp.net, there is an object sqltransaction we can use to garantee the data will be written to database either completely or none will be written into database. I am not sure if there is a similar thing I can use in classical asp. Can you provide some info? Thanks -- Betty
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.