When SQL Server database is online, it means the database is available and can be accessed for use by any application or user unless it is taken to offline.
In other words, the database is in a running state and users can perform operations such as querying etc.
To check the status of a SQL Server database and determine whether it is offline or online, you can use the following T-SQL command:
USE [master]; SELECT state_desc, name FROM sys.databases where [name] = 'SQL Tutorial';
As you can see in below image, [SQL Tutorial] is OFFLINE. Let's bring back it in ONLINE.
1. Run below SQL command in SSMS :
USE [master]; ALTER DATABASE [SQL Tutorial] SET ONLINE;
2. Above command will bring [SQL Tutorial] database back to ONLINE.
That's it! You have successfully taken [SQL Tutorial] database ONLINE using T-SQL.
1. Right-click on the database that you want to take online >> Select "Tasks" >> Select "Take Online".
2. In "Bring database online" dialog box, "success" message will appear along with database name >> Click on the "Close" button.
3. There you go, [SQL Tutorial] database brought back ONLINE successfully.
That's it! You have successfully brought back [SQL Tutorial] database ONLINE using GUI.
Yes, there are several online SQL databases available, such as Google Cloud SQL and Amazon RDS.
Yes, you can perform SQL queries online through platforms like SQL Fiddle or db<>fiddle.
Yes, you can create databases in online SQL platforms like Google Cloud SQL or Amazon RDS.
Yes, there are free SQL databases available, such as MySQL Community Edition, PostgreSQL, and SQLite.