Dragan,
Check
Re: KILL command Message #
812978>I'm writing a little utility which should notice when a fresh .bak file (containing a backup of a remote database) has appeared in a directory, and then restore the database from it.
>
>The problem here is that if there are active connections to the database, the restore will fail. Is there any stored procedure in SQL server which would return the number of such connections (apart from my own connection, that is)? Also, is there a way to close such connections?
>
>I know there must be something, because I can do that from Enterprise Manager, but I haven't found any such procedure or function in the books online. Could it be this is some heavy internal stuff that only EManager can access?
--sb--