SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


What happens if SSMS is force-closed by an RDP logoff while adding a column?


What happens if SSMS is force-closed by an RDP logoff while adding a column?

Author
Message
jasona.work
jasona.work
SSCrazy Eights
SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)

Group: General Forum Members
Points: 9846 Visits: 12526
So I was tasked with adding an Identity column to a very large table this weekend. Yesterday it failed because the Transaction Log ran out of room (DB is in simple recovery.) So I re-set things up today, gave the TLog an extra file on another disk to try to prevent the out-of-log-space error, and fired off the alter table command.

And went to get breakfast.

And had the GPO enforced RDP log off kick in while I was gone.

Forcing SSMS to close (I was RDPed into the server.)

It looks like my alter table might still be running (based on sys.dm_exec_requests and grabbing the text from sys.dm_exec_sql_text) but is there any way to be sure? Exec_Requests currently shows the process as suspended with a wait_type of pageiolatch_ex, so I'm presuming it's waiting on the disk system before continuing.

Any help?
Jason
GilaMonster
GilaMonster
SSC Guru
SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)

Group: General Forum Members
Points: 216369 Visits: 46277
If the connection was closed before the operation completed, it will have rolled back (or be in the process of rolling back)

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


jasona.work
jasona.work
SSCrazy Eights
SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)SSCrazy Eights (9.8K reputation)

Group: General Forum Members
Points: 9846 Visits: 12526
GilaMonster (5/5/2013)
If the connection was closed before the operation completed, it will have rolled back (or be in the process of rolling back)


Frak.

OK, thanks Gail, that's what I thought might be going on, and just wanted to be sure.

Going to set this up to run as an Agent job instead, this time...

Jason
GilaMonster
GilaMonster
SSC Guru
SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)SSC Guru (216K reputation)

Group: General Forum Members
Points: 216369 Visits: 46277
If you want to check, you can run

KILL <session_id> WITH STATUSONLY



Run that on a session that's not rolling back and you get an error. Run it on one that is rolling back and you get an estimate of rollback completion.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search