SQL Alter database failed - being used by checkpoint process

Posted by Manjot on Server Fault See other posts from Server Fault or by Manjot
Published on 2010-04-11T23:56:15Z Indexed on 2010/04/12 0:03 UTC
Read the original article Hit count: 413

Filed under:
|

Hi,

On my SQL server 2008, i have a SQL agent job to restore a database on nightly basis. Procedure:

  1. find latest backup on other server
  2. Kill all conenction to the destination database
  3. Restore destination database with replace, recovery

It failed last weekend because the database was being used by a system process (spid 11 checkpoint). since I couldnt kill the system process, I fixed this by restarting sql server. It failed this weekend as well with same error (checkpint process in this database as from sp_who) and when I run:

SELECT session_id,request_id,command,status,start_time
FROM sys.dm_exec_requests 
WHERE session_id = 11

It shows:

11  0   CHECKPOINT  background  2010-04-06 10:17:49.103

I cant restart the server every time it fails.
Can anyone please help me in fixing this?

Thanks in advance

Manjot

© Server Fault or respective owner

Related posts about sql-server-2008

Related posts about blocking