Getting Started with Azure SQL Database

Your comprehensive guide to deploying and managing relational databases in the cloud.

Quickstart: Create Your First Azure SQL Database

This guide will walk you through the essential steps to create and connect to your very first Azure SQL Database using the Azure portal.

Prerequisites

  • An active Azure subscription. If you don't have one, create a free account.
  • Basic understanding of relational databases and SQL.

Steps to Create Your Azure SQL Database

1. Sign in to the Azure portal

Open your web browser and navigate to the Azure portal. Sign in with your Azure account credentials.

2. Create a new SQL database

In the Azure portal search bar, type "SQL databases" and select it. Click "Create".

You'll be prompted to fill in details such as Subscription, Resource group, Server name, Administrator username, and Password.

3. Configure database settings

Choose your desired database name, compute and storage options (e.g., General Purpose, Business Critical), and backup storage redundancy.

For a quick start, the default settings are often sufficient.

4. Review and create

Review all the settings you've configured. Once you're satisfied, click "Create".

Deployment may take a few minutes.

Connecting to Your Database

After your database is deployed, you can connect to it using various tools.

Using SQL Server Management Studio (SSMS)

  1. Download and install SSMS if you haven't already.
  2. Open SSMS and in the "Connect to Server" dialog, enter the following:
    • Server name: Your Azure SQL server name (e.g., your-server-name.database.windows.net).
    • Authentication: SQL Server Authentication.
    • Login: Your administrator username.
    • Password: Your administrator password.
  3. Click "Connect".

Using Azure Data Studio

Azure Data Studio offers a modern, cross-platform experience. The steps are similar to SSMS, using your server name, username, and password.

Using the Azure CLI

You can also connect and manage your database using the Azure Command-Line Interface (CLI).

az sql db opentable --name <db-name> --server <server-name> --resource-group <resource-group-name> --allowed-ips <your-ip-address>

Next Steps