sql server - SQL Job Agent DB Restore fails with error #6107: Only user processes can be killed -


We have a SQL service agent who has "V hour" to restore our local database (Fudata) from the production backup Runs in.

First of all, the database is set to SINGLE_USER mode and any open process is killed. Second, the database is restored.

But with the error 6107, sometimes three steps fail: "Only user procedures can be killed"

It appears that once a week or twice a week It seems the interval in Here is the code for step 3 where failure occurs sometimes:

  USE Master; Go exec msdb.dbo.KillSpids FooData; Set up Fondue FooData SET MULTI_USER;   

Anyone have any idea what might be the reason for this error? I am thinking that some automatic process may start during Phase 3, or are some users trying to log in during that time? I'm not DBA, so I'm guessing at this point, though I believe a user should not be able to log in, while DB is in SINGLE_USER mode.

A user is probably not logged in. The system may be working some of the exec sp_who or sp_who2 will show the output of which is open to any SPID system process less than 50, and kill it can not be killed. The only way to stop them is to stop the SQL Server service or issue the SHUTDOWN command (which does the same thing).

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -