"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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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?
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users


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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

752 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