Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

What happens if SSMS is force-closed by an RDP logoff while adding a column? Expand / Collapse
Author
Message
Posted Sunday, May 5, 2013 10:30 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Today @ 8:00 PM
Points: 726, Visits: 5,199
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
Post #1449521
Posted Sunday, May 5, 2013 10:59 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 2:25 PM
Points: 39,910, Visits: 36,250
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 2008, MVP
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

Post #1449526
Posted Sunday, May 5, 2013 11:01 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Today @ 8:00 PM
Points: 726, Visits: 5,199
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
Post #1449528
Posted Sunday, May 5, 2013 12:06 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 2:25 PM
Points: 39,910, Visits: 36,250
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 2008, MVP
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

Post #1449542
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse