1 July, 2011
0 Comments
1 category
If you want to drop all connections to a database by using T-SQL, connect Microsoft SQL Server Management Studio to the master database, open a new query editor window and execute the following T-SQL code:
/* Drop all connections to a database */ -- Take database offline alter database [MyDatabase] set offline with rollback immediate -- Take database online alter database [MyDatabase] set online
Tags: SQL ServerT-SQL
Category: Uncategorized