Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 KILL spid

Author  Topic 

ServerTeam
Yak Posting Veteran

83 Posts

Posted - 2008-05-08 : 12:11:00
can we just kill spid and drop it without doing any rollback ...?


Thanks,
ServerTeam

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-08 : 12:25:35
Depends on the transaction. Rollback occurs for long transactions if you kill it.

You can check status with:

1) DBCC opentran for uncommitted tran
2)sp_who2 to see if rollback
3) Kill Spid with statusonly - to see status of rollback tran.
Go to Top of Page

ServerTeam
Yak Posting Veteran

83 Posts

Posted - 2008-05-08 : 12:30:06
SPID 139: transaction rollback in progress. Estimated rollback completion: 0%. Estimated time remaining: 325 seconds.
every time it shwing the same estimation time.
This is a long transaction.

Is there any way kill this.:-(

quote:
Originally posted by sodeep

Depends on the transaction. Rollback occurs for long transactions if you kill it.

You can check status with:

1) DBCC opentran for uncommitted tran
2)sp_who2 to see if rollback
3) Kill Spid with statusonly - to see status of rollback tran.



Thanks,
ServerTeam
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-08 : 12:35:31
Let it finish the rollback. Any reason for killing?
Go to Top of Page

ServerTeam
Yak Posting Veteran

83 Posts

Posted - 2008-05-08 : 12:41:04

yes will wait till rollback has done completely..:)

As BCP process is running..thru this spid..
as this is blocking just killed the process .But still its blocking while rolback.

Just want to get information is there any process to kill any spid without rollback if this is the case..


Thanks,
ServerTeam
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-08 : 12:50:39
No way. What status do you see now?
Go to Top of Page

ServerTeam
Yak Posting Veteran

83 Posts

Posted - 2008-05-08 : 12:54:15

As RUNNABLE
AND COMMAND AS RUNNABLE

Thanks,
ServerTeam
Go to Top of Page

ServerTeam
Yak Posting Veteran

83 Posts

Posted - 2008-05-08 : 12:55:31
as RUNNABLE
and command as KILLED\ROLLBACK

Thanks,
ServerTeam
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-05-08 : 22:48:18
>> can we just kill spid and drop it without doing any rollback

Possible by restarting sql with specific trace flag.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-09 : 01:22:21
quote:
Originally posted by sodeep

quote:
Originally posted by rmiao

>> can we just kill spid and drop it without doing any rollback

Possible by restarting sql with specific trace flag.



Not sure, it might keep your database in inconsistent state.I might be wrong .Never tried.

Go to Top of Page
   

- Advertisement -