Zombie Transaction from Long Running Alter Table

343 views
Skip to first unread message

bearrito

unread,
Sep 27, 2012, 12:46:35 PM9/27/12
to chucknorri...@googlegroups.com
I'm running a single up script that has the following content :

ALTER TABLE ThumbnailImage ALTER COLUMN ThumbnailImg VARBINARY(MAX) NULL;
GO

After I perform a restore if I then try and migrate I receive the following exception. : 

System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
12:15:40     at System.Data.SqlClient.SqlTransaction.ZombieCheck()
12:15:40     at System.Data.SqlClient.SqlTransaction.Commit()
12:15:40     at roundhouse.databases.AdoNetDatabase.close_connection()
12:15:40     at roundhouse.migrators.DefaultDatabaseMigrator.close_connection()
12:15:40     at roundhouse.runners.RoundhouseMigrationRunner.run()
12:15:40  This SqlTransaction has completed; it is no longer usable.

 I'm fairly certain that the command itself is not throwing an exception. It somehow seems related to activity occurring after the restore though I cannot quite put my finger on it.


Any thoughts on this?

Rob Reynolds

unread,
Sep 27, 2012, 12:48:44 PM9/27/12
to chucknorri...@googlegroups.com

Version of RH?

--
You received this message because you are subscribed to the Google Groups "chucknorris" group.
To view this discussion on the web visit https://groups.google.com/d/msg/chucknorrisframework/-/yKXZJ7sjYe0J.
To post to this group, send email to chucknorri...@googlegroups.com.
To unsubscribe from this group, send email to chucknorrisframe...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/chucknorrisframework?hl=en.

j.barrett strausser

unread,
Sep 27, 2012, 12:51:00 PM9/27/12
to chucknorri...@googlegroups.com
8.5.0 on SQL Server 2008. 

Running in a transaction with commandTimeout = 300

j.barrett strausser

unread,
Sep 27, 2012, 12:52:09 PM9/27/12
to chucknorri...@googlegroups.com
The ALTER TABLE command when run just from TSQL works, though it does take a while.

j.barrett strausser

unread,
Sep 27, 2012, 12:56:05 PM9/27/12
to chucknorri...@googlegroups.com
A little bit more of the log trace


12:38:56  Looking for Update scripts in "C:\JenkinsHome\Slave\workspace\Scrubbed\Migrations\MigrationScripts\0003\up". These should be one time only scripts.
12:38:56  --------------------------------------------------
12:38:56   Running 0009.ThumbnailImage.sql on ScrubbedSQL - ScrubbedDB.
12:50:58  --------------------------------------------------
12:50:58  Looking for Run First After Update scripts in "C:\JenkinsHome\Slave\workspace\Scrubbed\Migrations\MigrationScripts\0003\runFirstAfterUp".
12:50:58  --------------------------------------------------
12:50:58  --------------------------------------------------
12:50:58  Looking for Function scripts in "C:\JenkinsHome\Slave\workspace\Scrubbed\Migrations\MigrationScripts\0003\functions".
12:50:58  --------------------------------------------------
12:50:58  --------------------------------------------------
12:50:58  Looking for View scripts in "C:\JenkinsHome\Slave\workspace\Scrubbed\Migrations\MigrationScripts\0003\views".
12:50:58  --------------------------------------------------
12:50:58  --------------------------------------------------
12:50:58  Looking for Stored Procedure scripts in "C:\JenkinsHome\Slave\workspace\Scrubbed\Migrations\MigrationScripts\0003\sprocs".
12:50:58  --------------------------------------------------
12:50:58  --------------------------------------------------
12:50:58  Looking for Index scripts in "C:\JenkinsHome\Slave\workspace\Scrubbed\Migrations\MigrationScripts\0003\indexes".
12:50:58  --------------------------------------------------
12:50:58  --------------------------------------------------
12:50:58  Looking for Run after Other Anytime Scripts scripts in "C:\JenkinsHome\Slave\workspace\Scrubbed\Migrations\MigrationScripts\0003\runAfterOtherAnyTimeScripts".
12:50:58  --------------------------------------------------
12:50:58  RoundhousE encountered an error. You were running in a transaction though, so the database should be in the state it was in prior to this piece running. This does not include a drop/create or any creation of a database, as those items can not run in a transaction.
12:50:58  System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.
12:50:58     at System.Data.SqlClient.SqlTransaction.ZombieCheck()
12:50:58     at System.Data.SqlClient.SqlTransaction.Commit()
12:50:58     at roundhouse.databases.AdoNetDatabase.close_connection()
12:50:58     at roundhouse.migrators.DefaultDatabaseMigrator.close_connection()
12:50:58     at roundhouse.runners.RoundhouseMigrationRunner.run()
12:50:58  This SqlTransaction has completed; it is no longer usable.

Rob Reynolds

unread,
Oct 3, 2012, 5:59:31 PM10/3/12
to chucknorri...@googlegroups.com
I wonder if it has anything to do with the blob column. What did it used to be before it was switched to varbinary(max)?
____
Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder
Reply all
Reply to author
Forward
0 new messages