Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


"New transaction cannot enlist in the specified transaction coordinator"

Posted on 2003-03-25
Medium Priority
Last Modified: 2011-08-18
hello experts!
i have a COM component- an ActiveX DLL that i created in VB. i have one root class object that requires a new transaction, all my other classes require a transaction. my root has methods to create a secondary object, and setAbort and Commit methods that do just that through GetObjectContext. my other classes only toggle the bits by calling the DisableCommit or EnableCommit methods.
i then have an access database program that creates a root object which should start a new transaction and then all my other (secondary) objects get created through that root object, taking part in its transaction.
lately i've been getting an error (source of which is sometimes: Microsoft OLE DB Provider for SQL Server) stating "New transaction cannot enlist in the specified transaction coordinator". i realize that seems to have something to do with my distributed transaction server not being started. but shouldnt it start the server and enlist the transactions as needed? it does actually start the service which i see in my services console and often it'll work the second time after it's started.
other times i get an error on my root.setAbort statement (GetObjectContext.SetAbort) of "object variable or with variable not set". which also seems to point at a problem with the transaction if it has no context. one more clue- there's sometimes a message in my event viewer- "String message: Session idle timeout over, tearing down the session." do i have to give more time for the timeout?
any help on this matter would be greatly appreciated.
Question by:veevers
  • 3
  • 2
LVL 23

Expert Comment

ID: 8202201
> "New transaction cannot enlist in the specified transaction coordinator"

You usually get this error in SQL when you are trying to start a distributed transaction between 2 servers and the MS DTC service is not running (Microsoft Distributed Transaction Coordinator). You need to make sure this is running first, it won't auto start when you try to start a distributed transaction if the service is not already running. You should get it to auto start when the OS boots up.
Do this by:
1) Right click the SQL Server icon next to the time in the tray in the bottom right of the screen
2) Goto Open SQL Server Service Manager
3) Change the Services combo to Distributed Transaction Coordinator.
4) Start it and check the "Auto-start service when OS starts" check box

Author Comment

ID: 8206455
thank you for replying. that option is checked in my SQL Server Manager. the access program and dll are on another computer on my network- which then seems to me would use the MSDTC on the local machine. i can set the service there to start automatically (is there any other way besides thru services?) but what i can't understand is that it's been working and then i don't know what i changed but it's creating this error now.
LVL 23

Accepted Solution

adathelad earned 750 total points
ID: 8208974
It should also be checked on the other computer where the access program and dll are. An alternative way to start the MSDTC service is via the command prompt on the machine by typing:
net start msdtc

This won't auto start the service though, I always do it through the SQL Server Services Manager panel.
Has this other computer been rebooted? If it has and the auto start option was not checksed then this is what may have caused the error.

Is it working now?
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.


Author Comment

ID: 8209060
the auto start option for my service on my local machine is in the distributed transaction coordinator service properties. i've set it to automatic and it did solve the problem. i was just wondering if there was a reason why it suddenly stopped automatically enlisting it when it was set to manual all along. i appreciate your help. if my problem is solved, i'm happy enough.

Author Comment

ID: 8217093
i thought it solved it but it didn't! i still sometimes get the same errors!!

Expert Comment

ID: 11742539
The solution is as in the following:
1. Stop SQL Server and MSDTC Services on all particpated Servers
2. Start MSDTC Services on each paricipated Server sequentially
3. Start SQL Server Services on each particpated Server in the same sequence.

and dont forget to start your code with:
Let's hope this would resolve ur problem!


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question