View Thread
Rename database
|
|
admin |
Posted on 19-10-2011 13:09
|
Posts: 630 Joined: 19/11/2006 00:08 |
Ever tried renaming a database only to find yourself with the error: Quote MSSMS Error: The database could not be exclusively locked to perform the operation The simple work around is to disconnect users as you do it: Quote ALTER DATABASE db_Before SET SINGLE_USER WITH ROLLBACK IMMEDIATE ALTER DATABASE db_Before MODIFY NAME = db_After ALTER DATABASE db_After SET MULTI_USER WITH ROLLBACK IMMEDIATE Why MSSMS does not do this is beyond me.... (or at least prompt with the option to disconnect users) Jordon Pilling | Heavencore Administrator
|
|
Jump to Forum |