How to Take Database Offline and Bring it Online - SQL Server DBA Tutorial

In this video you will learn how to take database offline and bring database online using SQL Server Management Studio as well as using T-SQL script. It also demonstrates real time scenarios when it is best to attach and detach sql server databases.

Script used in this video

ALTER DATABASE [SalesOrders]
SET offline WITH ROLLBACK IMMEDIATE 
GO
ALTER DATABASE [SalesOrders] SET online;



 

How to Take Database Offline and Bring it Online

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.