How to take MSSQL database offline or bring it online?

Sometimes, you come across to a situations when you are required to physically move the database files. 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 SQL Server Management Studio interface as mentioned below.

Steps to Take MS SQL Database Offline

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

  2. Expand 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 MS SQL 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

→ Looking to check the active connection on your MSSQL DB? Please refer to check active MSSQL connection for more details.

Related Articles

vs shell installation has failed with exit code 1638.

You may receive the following error while installing MSSQL 2017 on Windows 2012 R2 Server. vs...

How to Increase the MS SQL Remote Query Timeout?

MS SQL Server has an option called Remote Query Timeout to specify the time (in seconds), a...

Choosing Between SQL Server 2012 and SQL Server 2014

If you are running SQL Server 2008 R2, you might be looking to upgrade your SQL server to...

How to fix an error "change password failed for login sa"?

Sometimes you receive following error while trying to reset MS SQL sa password via SQL Management...

How to setup MSSQL database mirroring?

Following are the steps to set up database mirroring using certificate-based authentication. You...

  • 1 Users Found This Useful

Was this answer helpful?