Wednesday 5 April 2023

How to take MSSQL database offline or bring it online?

 Sometimes, you come across a situation when you are required to move the database files physically. Online databases will not allow you such moving operations on “online” status; therefore, you will require to take your database offline to accomplish it. You can do it from the SQL Server Management Studio interface as mentioned below.

Steps to Take MSSQL Database Offline

1. Log in to your SQL Server Management Studio. Please refer to how to connect SQL using management studio for more details.  

2. Expand the Databases option and locate the database that you wish to take offline.

Expand Databases Option and Locate your Database from List
3. Right-click the database and select Tasks >> Take Offline.

Right Click the Database and Select Tasks > Take Offline Option
4. Once this is done, it will show you a message as below:

A Message Appear After Taking a Database Offline

Steps to Bring MSSQL Database Online

1. Once you are done with transferring the database files, you will require to bring the database online again.

2. For that, again expand the Databases option and locate your offline database.

Expand Databases Option and Locate the Offline Database
3. Right-click the database and select Tasks >> Bring Online.

Right Click the Database and Select Tasks > Bring Online
4. Once the process is done, it will show you a message as below:

A Message Appear After Bringing a Database Online


No comments:

Post a Comment