How can we dis-connect all the active users on sql-server 2005 express using sql
views:
29answers:
3
+1
A:
Hi,
take a look at this link
http://blog.sqlauthority.com/2006/12/01/sql-server-cursor-to-kill-all-process-in-database/
IordanTanev
2010-02-16 14:22:36
+1
A:
Just fire this sql query:
USE [master]
GO
ALTER DATABASE MyDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE; RESTORE DATABASE MyDB FROM DISK = 'backupfile path' WITH REPLACE
HotTester
2010-02-16 14:29:34
A:
USE [master]
GO
ALTER DATABASE [YourDB] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
Your Restore Statement
ALTER DATABASE [YourDB] SET MULTI_USER
GO
Doogie
2010-02-16 14:36:31