Link to home
Get AccessLog in
Avatar of araskas100
araskas100

asked on

How to end a DBCC command

Some of the DBCC commands take long time to run. What is the standard practice when issuing DBCC CheckDB, DBCC REINDEX etc. on Production servers? How do you kill such long running process  without resorting to server restart? What other queries/commands that I should know of before issuing on critical production servers? Is there any 3rd party tool that can do it quickly?

 
Avatar of SjoerdVerweij
SjoerdVerweij

Read the documentation for the commands. Some lock the tables they work on, some lock the database, some not at all.

You can stop them by finding their process ID (sp_who2 comes to mind), then issuing KILL <processID>.
Avatar of araskas100

ASKER

If you kill a DBCC it may or maynot respond to the request. Please refer to Microsoft Article on  Understanding How the Transact-SQL KILL Command Works at  http://support.microsoft.com/kb/171224/EN-US/

I am looking for a better solution.
Are you running 6.5?
It is SQL2k
ASKER CERTIFIED SOLUTION
Avatar of SjoerdVerweij
SjoerdVerweij

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access