ZombieCheck - This SqlTransaction has completed; it is no longer usable

Posts   
 
    
ivanc
User
Posts: 36
Joined: 29-Apr-2004
# Posted on: 23-Nov-2007 13:29:18   

This thing started to happen quite often. It seems that Rollback fails somehow (there is no error in the log) and every transaction afterwards rasults in a "SqlTransaction has completed; it is no longer usable".

How do we reset the adapter?

Or do we just dispose it and create a new one?

What happens to the transaction that turned into a zombie transaction?

If we try to close the adapter (CloseConnection) it calls Rollback automaticaly and fails again. Is there a way to reuse that adapter?

We use LLBLGen version 1.0.2005.1 Final November, 8. 2005.

Stack trace: Event class: ERROR Event description: System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable. at System.Data.SqlClient.SqlTransaction.ZombieCheck() at System.Data.SqlClient.SqlTransaction.Rollback() at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.Rollback() at PIMP.DAL.DatabaseSpecific.DataAccessAdapter.Rollback() in C:\PIMP\DAL 2.0\DatabaseSpecific\DataAccessAdapter.cs:line 947 at PIMP.Common.BLL.BDokumenti.ClearAfterError(Boolean statusChanged, Int32 vds_Id, String transactionName) in C:\PIMP2.0\Solutions\Common\BLL\BDokumenti.cs:line 1805 at PIMP.BLL.DokumentiProdaje.BPonude.SaveEntity(Int32 vds_Id, Boolean rezerviraj, Boolean fullSave, Boolean kreirajDokument, Boolean odobriIsporuku) in C:\PIMP2.0\Solutions\DokumentiProdaje\BLL\BPonude.cs:line 232 at PIMP.GUI.DokumentiProdaje.FormPND.SpremiClick() in C:\PIMP2.0\Solutions\DokumentiProdaje\GUI\FormPND.cs:line 948

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 23-Nov-2007 15:15:07   

The following thread might be relevant to your question: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=11842

ivanc
User
Posts: 36
Joined: 29-Apr-2004
# Posted on: 23-Nov-2007 17:02:37   

Here is something I found

http://support.microsoft.com/kb/912732

Has anyone ever had any experience with this patch? The problem is that the Zombie check happens... like a 100 times a day (database with about 200 users), a then 3-4 days without even a single Zombiecheck error.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 23-Nov-2007 20:57:33   

Please read what I wrote in the thread linked by Walaa.

Frans Bouma | Lead developer LLBLGen Pro
ivanc
User
Posts: 36
Joined: 29-Apr-2004
# Posted on: 24-Nov-2007 08:11:07   

I did. Thnx.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39619
Joined: 17-Aug-2003
# Posted on: 24-Nov-2007 10:34:16   

ivanc wrote:

I did. Thnx.

Then you would know that IF SQLServer rolls back the transaction due to an error (e.g. FK voilation), the SqlTransaction object is 'zombied' because it's not notified. simple_smile

I.o.w.: if sqlserver decides to roll back the transaction in any way without being told to do so, you get this situation. It's pretty sad though, as it thus requires you need an extra try/catch around the rollback....

Frans Bouma | Lead developer LLBLGen Pro