Thursday, March 8, 2012

Blocking

Have have process that blocks each other in SQL 7.0. How do I nuke these
processes?
KILL (spID)
spID is the process ID
http://sqlservercode.blogspot.com/
"Arne" wrote:

> Have have process that blocks each other in SQL 7.0. How do I nuke these
> processes?
|||Arne wrote:
> Have have process that blocks each other in SQL 7.0. How do I nuke
> these processes?
You can kill one of the SPIDs using the KILL <spid> command. That will
force a disconnect and subsequent rollback of the currently running
transaction.
But if they are truly blocking each other, they would probably deadlock.
And that would be resolved immediately by SQL Server. Are you sure that
there is not only one transaction that is causing others to wait for
resources? If so, figure out which spid is at fault and first see if the
user can disconnect gracefully from the application (assuming it is a
real user and not some system process). If not, then kill it. I would
encourage you to first determine what SQL is running using fn_get_sql()
and/or DBCC INPUTBUFFER in order to better address this problem in the
future.
David Gugick
Quest Software
www.imceda.com
www.quest.com

No comments:

Post a Comment