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
- Login in to your SQL Server Management Studio. Please refer to how to connect SQL using management studio for more details.
- Expand Databases option and locate the database that you wish to take offline.
- Right-click the database and select Tasks >> Take Offline.
- Once this is done, it will show you a message as below:
Steps to Bring MS SQL Database Online
- Once you are done with transferring the database files, you will require to bring the database online again.
- For that, again expand the Databases option and locate your offline database.
- Right click the database and select Tasks >> Bring Online.
- Once the process is done, it will show you a message as below:
→ Looking to check the active connection on your MSSQL DB? Please refer to check active MSSQL connection for more details.