Wednesday, March 16, 2011

Make db offline for SQL Server.

Have trouble take some db offline. According to some blogger, they say it is some other sql manager connection to the db. However, I manage to take two of bd off line on the same server. There could be some one else connected to the db but I cannot be sure.

One blogger suggests the following command

ALTER DATABASE db SET OFFLINE WITH ROLLBACK IMMEDIATE 
Another blogger says do this to kick out other users.
ALTER DATBASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE
Yet to try it but both looks promising. Will update this if successful over the weekend.


No comments:

Post a Comment