How to take an Azure SQL offlline?

Fredrik Dahlberg 1 Reputation point
2022-02-16T21:49:11.593+00:00

Hello,

The first thing you want to do if there is known security flaw in an application is to take the database offline. Before moving things to Azure. What is the process to take a SQL database offline?

/x

Azure SQL Database
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 33,001 Reputation points MVP
    2022-02-16T22:04:47.053+00:00

    You cannot turn it off as an Azure VM, but you can use Azure SQL Serverless thar can be paused automatically (not manually) after one hour of inactivity. The rest of Azure SQL options cannot be paused.

    You can also configure Azure SQL Database firewall to not allow SQL connections.

    You can find more alternatives on this MSDN forum thread.

    0 comments No comments

  2. GeethaThatipatri-MSFT 27,977 Reputation points Microsoft Employee
    2022-02-16T22:09:33.417+00:00

    Hi, @Fredrik Dahlberg Welcome to Microsoft Q&A Thanks for posting your question.
    As we understand the ask here is to know the process to take a SQL database offline before moving to Azure.

    Here are a few work-around to solve this.

    1. Rename database to a different name (alter database rename statement)
    2. Delete the database and restore after testing using the restore feature in SQL DB
    3. Remove the server-level firewall rules so no one from the Internet can access the database.

    Regards
    Geetha