Making a MS SQL Database Offline

The following code is run to take a database to offline mode in MS SQL Server.

ALTER DATABASE {Database Name} SET OFFLINE

An example of its use is as follows.

ALTER DATABASE [OurDB] SET OFFLINE

After performing this operation, it will be seen that there is no change in the left panel (Object Explorer). To see this change, right click on the Databases folder and "Refresh".



You May Interest

Changing Column Name of MS SQL Table with Query

What is the Use of Dedicated Admin Connection ?

What are Isolation Levels in SQL Server ?

What is the Difference Between CHAR and VARCHAR Datatypes in SQL ...

What is a Covered Index in SQL Server ?