Web Analytics Made Easy - Statcounter

Database is made offline to move its physical files. There can be many ways to make a database offline. But there are three main methods which are used frequently to make the database offline. These methods are given below:-


1)With the help of Alter database Command:-

We can make the database offline or online with the help of the Alter database command. The Alter Database command to make the database offline is :-

    ALTER DATABASE database name SET Offline

If we want to make the database online we can use the following Alter Database command:-

  ALTER DATABASE database name SET Online

2)With the help of the Db_options:-

 We can also use the db_options command to make a database offline or online.To make a database offline we can use the following command:-

sp_dboption databasename ,’offline’,true

To make the database online we can use the following command:-

sp_dboption databasename ,’offline’,false

3)With the help of Sql server management studio:-

We can also use the Sql server management studio to make a database offline as shown in the given figure.
To make database offline we have to follow steps show in fig 1 and to bring back the database online we needs to follows the step shown in fig 2:-

Fig1
Fig2

DMCA.com


Discover more from Technology with Vivek Johari

Subscribe to get the latest posts sent to your email.

By vivekjohari

I am currently working as a Senior Database Professional and have around 18 years of experience in database. Degree:- Master Degree in Computer(MCA) Certification course in Data Science & Machine Learning from Indian Institute of Technology (IIT), Delhi Work experience:- Designing of the database. Database Optimization. Writing Complex Stored Procedures,Functions,Triggers etc. Designing and developing SSIS & DTS packages. Designing SQL Reports using SSRS. Database Server Maintenance. Certification:- MCTS: DA-100: Analysing Data with Microsoft Power BI MCTS: DP-300: Administering Relational Databases on Microsoft Azure Microsoft certified Sql DBA in Sql server 2008 (MCTS). Microsoft certified BI professional in Sql server 2008 (MCTS). Oracle certified profession DBA in ORACLE 10g (OCP) certified profession DBA in ORACLE 9i (OCP) My other publication Technical Blog:- Technologies with Vivek Johari Guest Author and Blogger at sqlservercentral.com

2 thought on “How to make database offline or online”
  1. hello vivek ,i m sonal, i have created a software using sql database. the software working properly in one computer but i need to connect the database with several computer kindly suggest me that how could i place the database on network and connect it to my software running in different computer ..
    My email.id is sonal.nature@gmail.com

Leave a Reply

Discover more from Technology with Vivek Johari

Subscribe now to keep reading and get access to the full archive.

Continue reading