Translate

Thursday, March 10, 2011

Take sql database offline using query

If you try to take the MS SQL database offline by right clicking and selecting "take offline", it almost always hangs.

Try this instead 


use master
alter database databaseName set  offline with rollback immediate



To bring it back online do this:


use master
alter database databaseName set  online

No comments:

Post a Comment

Comments will appear once they have been approved by the moderator