You are here: Re: Long query rollback - can I rename the table? « MsSQL Server « IT news, forums, messages
Re: Long query rollback - can I rename the table?

Posted by Dan Guzman on 03/08/07 12:46

> So say and update updates TABLE_A and I stop it, whilst this
> transaction is rolling back I attempt to rename TABLE_A to TABLE_A_OLD
> and rename a different table to become TABLE_A. I am assuming that
> the rollback actions will use the object reference of TABLE_A_OLD and
> continue to rollback the effects on the correct table and not corrupt
> 'new' TABLE_A... or will it not allow me to rename TABLE_A until the
> rollback is complete?

I would expect that the rename will be blocked until the rollback completes.
The rename requires a schema modification lock, which is incompatible with
the locks held on TABLE_A by the open transaction.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"cheesey_toastie" <bletchley_scum@yahoo.co.uk> wrote in message
news:1173354816.121044.292670@h3g2000cwc.googlegroups.com...
>I have a long query which I have set off and would like to stop, and
> rename one of the tables used.
>
> My query is due to my lack of understanding of the underlying
> structure of MSSQL-Server...
>
> So say and update updates TABLE_A and I stop it, whilst this
> transaction is rolling back I attempt to rename TABLE_A to TABLE_A_OLD
> and rename a different table to become TABLE_A. I am assuming that
> the rollback actions will use the object reference of TABLE_A_OLD and
> continue to rollback the effects on the correct table and not corrupt
> 'new' TABLE_A... or will it not allow me to rename TABLE_A until the
> rollback is complete?
>
> Thanks for any help!
>
> Steve
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация