Search code examples
sql-serversql-server-2008-r2clustered-indexkill-process

Stopping Clustered Index script


I have a loooooong running script that us generating a clustered index on a 77M row - 20GB table.

I need to query this data so I want to stop the Index Generation and resume it in the night.

Is it OK to KILL the ProcessId?


Solution

  • SQL Server should respond just fine to killing any process. However, it might take a while to cleanup after itself. For instance, if you kill a big update query, it will have to roll-back the transaction. For in index build, it should not have such problems and should return relatively quick. Point is, as long as you let the kill finish without doing something drastic like powering down, you should be fine.