Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, I need to lock a database (prevent users from connecting) in order to update it. I already know how to kick everyone out with their spid but i can't figure how to prevent them from reconnecting. Thanks !
Post Follow-up to this messageSet the datbase in single user mode, so no one can reconnect. ALTER DATABASE myDB SET SINGLE_USER WITH ROLLBACK Immediate Markus
Post Follow-up to this messageKittikun (kittikun@gmail.com) writes: > It works, thanks a lot ! And when you are done ALTER DATABASE db SET MULTI_USER -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/pr...oads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodin...ions/books.mspx
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread