anthony.green (1/9/2013)
What version of SQL are you running?What is the purpose of the task at hand, do you just want to boot people out or are you setting the DB into single user mode?
sysprocesses and sysdatabases are also depreciated
The purpose of task is , restore database
so first need to kill all spids for that database and then
change database into single user mode
so right now, job is failed to step-1(kill all spids)