Skip to main content
This guide shows how to create an Azure SQL database from the Azure portal, explains how servers relate to databases, and walks through connecting with a client tool (Azure Data Studio). It follows the typical workflow you’ll encounter in labs and demos: select service → create server → configure compute/security/networking → provision sample data (optional) → connect and query.

1. Open Azure SQL in the portal

From the Azure home screen, enter “Azure SQL” in the search bar and choose the Azure SQL service. The Azure SQL overview lists both servers and individual databases; pay attention to the Resource type column so you know whether an entry is a SQL Server resource (a logical host that can contain many databases) or a single database. A “serverless” database is still hosted on a virtual machine, but Azure manages the VM characteristics based on the tier and compute settings you choose. Tip: for repeated demos or labs, consider pre-creating a reusable server to avoid re-entering administrator credentials each time.

2. Start creating a database

Click Create and pick the option that matches your needs:
  • SQL Managed Instance — closest to full SQL Server compatibility; higher cost.
  • SQL Database — lets you create a single database or an elastic pool.
An elastic pool lets multiple databases share CPU/memory so they can burst as needed and reduce cost. For this demo we choose Single database and click Create. On the Create SQL Database blade you must choose:
  • Subscription (billing)
  • Resource group
  • Database name (example: PHVAZ)
  • Server (select an existing server or Create new)
When creating a new server you must provide:
  • Server name (lowercase used in the server URL)
  • Region
  • Authentication method and server admin credentials
Authentication options: Always record the server administrator username and password — you’ll need them to connect from client tools.
Remember the server administrator name and password you set here. You will need them later to connect from tools such as Azure Data Studio, and forgetting them can interrupt your lab work.

3. Compute sizing and pricing considerations

  • You do not select explicit VM hardware (disk I/O, GPU) like you would with a VM. Those capabilities are abstracted by the selected database tier and compute options.
  • Compute cost is billed through the selected subscription and shown on the create blade.
  • For experimentation, use a Development tier or serverless options (when supported) and pause/stop compute when allowed to lower costs.
Switching to a development-oriented tier or enabling serverless auto-pause can substantially reduce monthly cost for lab environments.

4. Networking — allow client access

Go to Networking to configure how clients connect to the server. For labs you’ll typically add your current client IP to the server-level firewall so your machine can connect during setup. Clicking “Add current client IP” inserts a firewall rule permitting access from that IP while blocking others.
A screenshot of the Microsoft Azure portal on the "Create SQL Database" page showing the Networking tab with firewall rules and an option to add the current client IP. A cost summary pane with an SQL icon and pricing details is visible on the right.
Use server-level firewall rules to limit client IP ranges that can access all databases on the server. In production, prefer private endpoints or very restrictive rules instead of broadly permitting client IP ranges.
Avoid leaving broad or public firewall rules open after finishing a lab. Restrict access or remove temporary IP rules to reduce exposure.

5. Security options

On the Security tab you can enable features such as:
  • Microsoft Defender for SQL — threat detection and activity monitoring.
  • Ledger — tamper-evident auditing of changes by hashing tracked data.
Enable these features according to your compliance and monitoring requirements. Defender for SQL can help identify suspicious activity early in production or during sensitive testing.

6. Additional settings — initial data source

Under Additional settings choose the initial data source for the database: Some labs require AdventureWorks sample data. Select Sample to provision tables and data automatically for those exercises.
A screenshot of the Microsoft Azure portal showing the "Create SQL Database" wizard on the "Additional settings" tab, including options to choose a data source (None / Backup / Sample) and database collation. On the right is a cost summary panel with a SQL icon and estimated storage and compute costs.

7. Review, create, and wait for deployment

Click Review + Create. If validation passes, click Create. Deployment typically takes several minutes. When finished, return to the Azure SQL overview to see the database (example PHVAZ) and its server (example PHV2) listed.
A screenshot of the Microsoft Azure portal showing the Azure SQL blade with a list of two SQL resources (phv2 and PhvAz) and active filters for subscription, resource group, and location. The table shows columns like resource type, service tier, resource group, location, and subscription.
From the database resource you can:
  • Manage firewall rules
  • Configure security (Defender, auditing, ledger)
  • Scale compute and storage
  • View connection strings for use in client applications
Note: The Azure portal does not include a full table browser for querying data. Use an external client to query and view database contents.

8. Connect with Azure Data Studio

Recommended client tools:
  • Azure Data Studio — lightweight, cross-platform, and purpose-built for database work.
  • Visual Studio / Visual Studio Code — useful when integrated with development workflows.
Download Azure Data Studio: Launch Azure Data Studio and open the Connection dialog. Enter:
  • Server: the server URL shown in the portal
  • Authentication type: SQL Login
  • Username: server admin user you created
  • Password: server admin password
A screenshot of Azure Data Studio with a "Connection" dialog for Microsoft SQL Server on the right, showing server, username, password and database fields filled and the "Connect" button. The left side shows the Azure Data Studio welcome screen and sidebar icons.
After connecting, expand the Databases node, open your database, and explore tables. Right-click a table (for example, Address) to choose Edit Data or Select Top 1000. Selecting Top 1000 generates and runs a SELECT query and displays results. The editor shows both the query text and returned rows so you can modify and run additional queries while learning SQL.

Quick checklist

That completes the end-to-end flow for creating an Azure SQL database: choosing or creating a server, configuring compute and security, optionally provisioning sample datasets for labs, and connecting with Azure Data Studio to explore and query your data.

Watch Video