SQLforGeeks
  • Home
  • SQL
  • SQL Tutorial
  • SQL Syntax
  • Our Services
Contact
  1. SQL
  2. Database online

Text copied!

« Previous
Next »

Database online

Dec. 16, 2022, 6:38 a.m. under SQL

  • Hi! You should check Database offline post first.

    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';
            
    Database online
    To take database online, you can use the graphical user interface (GUI) or Transact-SQL (T-SQL).
    Here's an example of how to take database online using T-SQL :

    As you can see in below image, [SQL Tutorial] is OFFLINE. Let's bring back it in ONLINE.

    Database 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.

    Database online

    That's it! You have successfully taken [SQL Tutorial] database ONLINE using T-SQL.

    Here's a step-by-step guide on how to take SQL database ONLINE using GUI :

    1. Right-click on the database that you want to take online >> Select "Tasks" >> Select "Take Online".

    Database online

    2. In "Bring database online" dialog box, "success" message will appear along with database name >> Click on the "Close" button.

    Database online

    3. There you go, [SQL Tutorial] database brought back ONLINE successfully.

    Database online

    That's it! You have successfully brought back [SQL Tutorial] database ONLINE using GUI.

    Frequently Asked Questions :

    Is there an online SQL database?

    Yes, there are several online SQL databases available, such as Google Cloud SQL and Amazon RDS.

    Can I do SQL online?

    Yes, you can perform SQL queries online through platforms like SQL Fiddle or db<>fiddle.

    Can we create database in online SQL?

    Yes, you can create databases in online SQL platforms like Google Cloud SQL or Amazon RDS.

    Is there a free SQL database?

    Yes, there are free SQL databases available, such as MySQL Community Edition, PostgreSQL, and SQLite.
    Thank You! You should check SQL commands post next.
    « Previous
    Next »
    RELATED :

    What is SQL

    What is T-SQL

    Difference between DBMS and Data Warehouse

    Download SQL Server

    Install SQL Server

    Download SQL Server Management Studio SSMS

    SQL Server Management Studio

    SQL Database

    Download database

    Restore database

    Backup database

    Attach database

    Detach database

    Create database

    Delete database

    Rename database

    Select database

    Database offline

    SQL Commands

    SQL Tables

    Create table

    Truncate table

    Delete table

    Rename table

    Select table

    Alter table

    SQL Data Types

    SQL Comments

    SQL Constraints

    SQL Joins

    SQL inner join

    SQL left join

    SQL right join

    SQL full join

    SQL cross join

    SQL self join

    INSERT INTO SELECT statement

    INSERT INTO statement

    SQL Clauses

    SELECT clause

    FROM clause

    WHERE clause

    GROUP BY clause

    HAVING clause

    ORDER BY clause

    JOIN clause

    UNION clause

    UNION ALL clause

    TOP clause

    DISTINCT clause

    SQL Operators

    SQL Arithmetic operators

    SQL Comparison operators

    SQL Logical operators

    UNION operator

    UNION ALL operator

    INTERSECT operator

    EXCEPT operator

    LIKE operator

    NOT LIKE operator

    IN operator

    NOT IN operator

    IS NULL operator

    IS NOT NULL operator

    EXISTS operator

    NOT EXISTS operator

    BETWEEN operator

    NOT BETWEEN operator

    SQL Functions

    SQL Built-In functions

    CHARINDEX function

    DATEADD function

    CONCAT function

    LEN function

    REPLACE function

    SUBSTRING function

    CASE statement

    GETDATE function

    DATEPART function

    DATEDIFF function

    CAST function

    TRY_CAST function

    CONVERT function

    TRY_CONVERT function

    ISNULL function

    NULLIF function

    COALESCE function

    SQL Window functions

    ROW_NUMBER function

    RANK function

    DENSE_RANK function

    IIF function

    CHOOSE function

    SQL Store Procedure

    Store Procedure vs. Function

    SQL Subquery

    SQL Aliases

    Temp table

    SQL Error Handling

    SQL Variables

    SQL Views

    SQL Merge

    SQL CTE

    SQL WITH TIES

    Define Transaction in DBMS

    ACID properties in DBMS

    Types of Triggers in DBMS


    • Have Some Questions?
    logo

    Elevate your data experience with SQL excellence

    Quick Links
    •  Home
    •  SQL Tutorial
    •  SQL Syntax
    •  Our Services
    Our Services
    • Web Development
    • BI Development
    • Data Warehousing
    • Data Integration ETL


    Follow Us

    GST Registered: XXAXXXXXXXZX
    Mumbai, Maharashtra, India support@sqlforgeeks.com

    © 2025 Copyright™ | All Rights Reserved | Privacy Policy