Create an Azure SQL Database using the Azure Portal

Prerequisites

Step‑by‑step guide

  1. 1
    Sign in to the Azure portal
    Visit https://portal.azure.com and sign in with your credentials.
  2. 2
    Create a new SQL database
    Navigate to + Create a resourceDatabasesSQL Database.
  3. 3
    Configure basics
    • Subscription: select your subscription.
    • Resource group: create a new group or select an existing one.
    • Database name: e.g., mySampleDB.
    • Server: click Create new and fill in server name, admin login, password, and region.
    • Compute + storage: choose the desired tier (e.g., Basic for a quick start).
  4. 4
    Additional settings (optional)
    Configure backups, security, or use an existing sample data set. For a quick start, leave defaults.
  5. 5
    Review + create
    Review your configuration, then click Create. Deployment typically takes a few minutes.
  6. 6
    Connect to your database
    After deployment, go to the resource and click Connection strings. Use the provided ADO.NET, JDBC, or ODBC strings.

Sample Azure CLI command

For automation, you can create the same database with Azure CLI:

az sql db create \
    --resource-group MyResourceGroup \
    --server myserver \
    --name mySampleDB \
    --service-objective Basic