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

How to Learn MS SQL Server Version

How to Rebuild the Master Database in SQL Server ?

Finding Session Id in MS SQL User's Current Process

What is the Maximum Number of Columns a Table in SQL Server ?

Showing Server Active Server Name in MS SQL