I have SqlServer 2000. I need to detach a database and for
this i am making sure to kill the connections to that
database. I am doing this after removing the replication
setup on this database. When i try to kill connections i
am having a cursor for the following sp id's and looping
through each of this pid and calling kill pid
Select spid, dbid from master..sysprocesses
this procedure of kill i call being in a different
Now sometimes i get an error that Only user processes can
be killed when i run my kill procedure.
How do i make sure to kill only user processes on the
database and if some system process is accessing my
database i do i manage to detach my database.
Also is there any flag to check if it is a user or system
process in the sysprocesses