Hello
I am looking for a command that would kill all sessions (active or not) on a
database or server.
Is there such command?
thanks for your help
WilfridIt is easy at the database level. Use ALTER DATABASE ... SET SINGLE_USER WITH ROLLBACK IMMEDIATE. At
the server level, you could loop sysprocesses and for each connection, execute the KILL command.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Wilfrid" <grille11@.yahoo.com> wrote in message news:442d4094$0$479$626a54ce@.news.free.fr...
> Hello
> I am looking for a command that would kill all sessions (active or not) on a database or server.
> Is there such command?
> thanks for your help
> Wilfrid
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment