Azure SQL Developer Hub

Azure SQL, built for AI workloads

Bring the idea. Build with Azure SQL.

Start with a prompt. Give your AI coding agent SQL skills, and make your next app yours.

Works with Claude Code, GitHub Copilot, Codex, and Cursor.

Idea to app. $0 to start.

Get a database running

Start free in Azure, or run the same engine on your machine. Set it up yourself or hand it to your coding agent.

Then:Local or free tierAzure SQL DatabaseSame code, connection string changes, app goes live.

Get a free Azure SQL database

Free every month

Compute
100,000vCore seconds
Data storage
32 GBper database
Backup storage
32 GBper database
Free databases
10per subscription

Set it up yourself

You need an Azure subscription that can create resources.

  1. 1
    Create the database

    Open the Azure portal and select Start free. Create when Estimated cost/month shows 0.

  2. 2
    Allow your IP

    On the server's Networking page, add your client IP and save.

  3. 3
    Test the connection

    Run SELECT 1 in the query editor.

Azure SQL Database container

Public preview

The Azure SQL Database engine on your machine. Free, no Azure subscription.

Set it up yourself

Run these in PowerShell. You need Docker 24 or later, with the engine running. docker info checks it.

The commands use docker. With Podman, use podman. With Apple container, use container, with container image pull to pull and --memory 2g --detach in place of -d. With WSL, use wslc.

  1. 1
    Get the image

    It's public on Microsoft Container Registry. No sign-up needed.

    docker pull mcr.microsoft.com/mssql/azure-sql-db-server:latest
  2. 2
    Start the container

    This makes a strong SA password and starts the engine on localhost, port 1433.

    Windows, in PowerShell

    $env:MSSQL_SA_PASSWORD = "Aa1" + [guid]::NewGuid().ToString("N")
    docker run --name sqldb -e "ACCEPT_EULA=Y" `
      -e "MSSQL_SA_PASSWORD=$env:MSSQL_SA_PASSWORD" `
      -p 127.0.0.1:1433:1433 -d `
      mcr.microsoft.com/mssql/azure-sql-db-server:latest

    macOS and Linux, in bash or zsh

    MSSQL_SA_PASSWORD="Aa1$(openssl rand -hex 16)"
    docker run --name sqldb -e "ACCEPT_EULA=Y" \
      -e "MSSQL_SA_PASSWORD=$MSSQL_SA_PASSWORD" \
      -p 127.0.0.1:1433:1433 -d \
      mcr.microsoft.com/mssql/azure-sql-db-server:latest
  3. 3
    Connect and query

    Run this in the same terminal, so it can read the password. It waits up to a minute for the engine to start, usually a few seconds. The result should name Microsoft SQL Azure. If it shows an error instead, the container's logs say why.

    Windows, in PowerShell

    for ($i = 0; $i -lt 30; $i++) {
      docker exec sqldb /opt/mssql-tools18/bin/sqlcmd -S localhost `
        -U sa -P "$env:MSSQL_SA_PASSWORD" -C -Q "SELECT 1" *> $null
      if ($LASTEXITCODE -eq 0) { break }
      Start-Sleep 2
    }
    docker exec sqldb /opt/mssql-tools18/bin/sqlcmd `
      -S localhost -U sa -P "$env:MSSQL_SA_PASSWORD" -C `
      -Q "SELECT @@VERSION;"

    macOS and Linux, in bash or zsh

    for i in {1..30}; do
      docker exec sqldb /opt/mssql-tools18/bin/sqlcmd -S localhost \
        -U sa -P "$MSSQL_SA_PASSWORD" -C -Q "SELECT 1" >/dev/null 2>&1 && break
      sleep 2
    done
    docker exec sqldb /opt/mssql-tools18/bin/sqlcmd \
      -S localhost -U sa -P "$MSSQL_SA_PASSWORD" -C \
      -Q "SELECT @@VERSION;"

Find a template for your next app

Full apps and focused building blocks for dashboards, APIs, search, and more. No database yet? Get a database running.

  1. Choose a template
  2. Review the build prompt
  3. Build and customize

Apps

Sales dashboard with AI Q&A

See how your business is doing at a glance, and ask questions in plain English to get instant charts and answers.

View details

Help desk with tenant isolation

Run one support app for many companies, where each company sees only its own tickets.

View details

Real-time IoT dashboard

Stream readings from thousands of devices and watch charts and alerts update as the data arrives.

View details

Online store that never oversells

Sell limited stock and bookable slots without overselling, even when many customers order at once.

View details

Team wiki with time travel

Keep your team's pages and tasks, and see or restore any of them as they were at an earlier time.

View details

Building blocks

Build a task-tracking app

JavaScript

Build a web app that displays tasks stored in Azure SQL. Start with sample data and make it your own.

View prompt

Build an API for your app

Python

Give your app a way to create, complete, and retrieve tasks. Build a Python API that connects to Azure SQL with Microsoft Entra, no passwords.

View prompt

Search your content by meaning

Python / AI

Find relevant text with vector search in Azure SQL. Build the retrieval layer for a RAG app using sample text and an embedding model you provide.

View prompt

Create a serverless task API

.NET

Read and save tasks through an Azure Functions API backed by Azure SQL. Build and test the functions locally.

View prompt

Respond to data changes

.NET

Extend the serverless API with a function that reacts when tasks change in Azure SQL. Log inserts, updates, and deletes as a starting point for automation.

View prompt

Separate each customer's data

JavaScript

Extend a task app for multiple customers. Add row-level security and test that one tenant cannot read another tenant's tasks.

View prompt

Store search with AI answers

Help shoppers find products and get instant answers using AI-powered search.

A search page for an online store. Shoppers type the way they talk, like "warm jacket for a rainy hike under $150", and see the right products next to the help article that answers them. Questions get a short answer with links to its sources. Staff see what people search for and which searches come up empty. Tell your agent what you sell and what the store is called, and it builds the catalog to match.

Azure SQL Database does the searching in a single query. Full-text search matches the words, vector search matches the meaning, and results found both ways rank first. Turn on Under the hood to see the exact SQL and how fast it ran. Run it on your machine, or deploy it to Azure Container Apps with azd up or to Microsoft Fabric.

Check it works

  1. Search the way you talk: Search for "warm jacket for a rainy hike under $150". Jackets under $150 come up, including rain shells that never use the words "warm" or "rainy".
  2. Ask a question: Ask "Can I return boots I wore outside?" The answer cites the returns article. Click the citation to jump to the passage.
  3. Look under the hood: Turn on Under the hood. One SQL statement runs both searches, and you can see how long it took and that the vector index was used.

Sales dashboard with AI Q&A

See how your business is doing at a glance, and ask questions in plain English to get instant charts and answers.

A sales dashboard for a business owner. Open it and see in seconds how the business is doing: revenue, new customers, revenue per customer and churn, each compared with last year. Click a region, channel or product to filter every chart, and open the invoices behind any number. When the charts don't answer it, ask in plain English, like "which add-ons grew fastest in Europe since spring?", and get a chart and a short answer. Tell your agent what kind of business it is and what it's called, and it builds the data to match.

Azure SQL Database keeps it fast. Millions of sales records sit in a columnstore index ordered by date, so every chart answers in a fraction of a second. Questions run as a separate database user that can only read, so a question can never change your data. Turn on Under the hood to see each chart's SQL and how much data it skipped. Run it on your machine, or deploy it to Azure Container Apps with azd up or to Microsoft Fabric.

Check it works

  1. Read the overview: Open the last 90 days against last year. Each tile matches a direct SQL query to the cent.
  2. Ask a question: Ask "Which add-ons grew fastest in Europe since spring?" You get a bar chart, a sentence naming the top add-on, and the read-only SQL.
  3. Try to change data: Ask "Delete all refunds from last year." Nothing changes: the app says it can only read, and the database refuses the statement too.

Help desk with tenant isolation

Run one support app for many companies, where each company sees only its own tickets.

A help desk that many small companies sign up for. Agents work an inbox sorted by SLA, with queues, priorities and timers that turn amber and then red. Open a ticket to see the conversation, internal notes and the customer's other tickets, with a suggested reply and similar solved tickets. Customers send tickets through each company's own form. Tell your agent what kind of support it is and what the product is called, and it builds the companies and tickets to match.

Azure SQL Database keeps each company's tickets apart. A row-level security policy filters every query and blocks every write by the company set in the session context, so even a bug in the app can't show one company another's tickets. The session context is set and cleared on every request, so pooled connections never leak it. Turn on Under the hood to see the policy and the session context of your request. Run it on your machine, or deploy it to Azure Container Apps with azd up or to Microsoft Fabric.

Check it works

  1. Sign in as an agent: Sign in to Fourth Coffee. The inbox shows only Fourth Coffee's tickets, breached ones first.
  2. Open another company's ticket: Open a ticket, then change the id in the address to one of another company's tickets. You get not found, because the database returned no row.
  3. Find similar tickets: Open a ticket. Similar solved tickets come only from the same company, even when another company has a closer one.

Real-time IoT dashboard

Stream readings from thousands of devices and watch charts and alerts update as the data arrives.

A live console for a fleet of sensors. A built-in simulator streams readings from thousands of devices, and the overview shows every site and asset, readings per second, open alerts and charts that move as the data arrives. Open a device to see its readings against its limits, acknowledge alerts, edit the rules and preview what they would catch, and ask for a plain-English explanation of an alert. Tell your agent what kind of devices you have and what the business is called, and it builds the fleet to match.

Azure SQL Database takes the stream and answers fast. Readings arrive in batches that are safe to retry, so a resent batch stores nothing twice, and land in an ordered columnstore with millions of rows. DATE_BUCKET rolls them up by time window, late readings land in the right bucket, and the alert rules run in SQL. Turn on Under the hood to see the ingest statement, the rollup query with its time, and the row groups. Run it on your machine, or deploy it to Azure Container Apps with azd up or to Microsoft Fabric.

Check it works

  1. Watch it live: Open the overview. Readings per second, the charts and the open alerts update as the simulator streams.
  2. Follow an alert: When a freezer starts warming, its square turns amber and an alert opens. Acknowledge it, and it closes once the readings recover.
  3. Resend a batch: The simulator resends a few batches on purpose. Under the hood shows them skipped, with nothing stored twice.

Online store that never oversells

Sell limited stock and bookable slots without overselling, even when many customers order at once.

An online store for things there are only so many of: a limited run released in a timed drop, and appointments only one customer can have. Shoppers watch the stock count fall live, put something in their cart, and get ten minutes to check out before it goes back on sale. Staff watch orders arrive and go out to the warehouse and workshop, and can fire hundreds of buyers at a drop at once to see that it never sells one more than it has. Tell your agent what you sell and what the store is called, and it builds the products to match.

Azure SQL Database keeps it honest. One conditional UPDATE takes stock or refuses, a unique idempotency key makes a double-clicked checkout one order, and each order is written with its outbox row in one transaction, so background workers send every order on exactly once. Turn on Under the hood to see the reserve statement, the locking it uses and the outbox queue. Run it on your machine, or deploy it to Azure Container Apps with azd up or to Microsoft Fabric.

Check it works

  1. Run a rush: On the staff page, send 500 buyers at a drop of 100. Exactly 100 sell, none oversold, and every order is sent once.
  2. Watch the naive way fail: Run the same rush with the naive read-then-write lane. It sells far more than it has.
  3. Check out twice: Double-click Place order. You get one order, and the second click shows the same one again.

Team wiki with time travel

Keep your team's pages and tasks, and see or restore any of them as they were at an earlier time.

A wiki and task board for a team. Write pages in Markdown, link tasks to them, and see what changed this week. Drag the time slider to read the whole wiki as it was last Tuesday at 3 pm, compare any two versions side by side, and restore an old one. When two people edit the same page, the second save offers to merge instead of overwriting. Ask for a summary of what changed on a page since a date. Tell your agent what kind of team it is and what it's called, and it writes pages and history to match.

The history comes from Azure SQL Database itself. Pages and tasks are system-versioned temporal tables, so the database records every save, and FOR SYSTEM_TIME AS OF shows the wiki exactly as it was at any moment. A retention policy keeps a year of history. Turn on Under the hood to see the time-travel query and how many rows came from history. Run it on your machine, or deploy it to Azure Container Apps with azd up or to Microsoft Fabric.

Check it works

  1. Go back in time: Click Last Tuesday 3 pm. The page tree, the open page and the task board all change to how they were then.
  2. Compare two versions: Open the Release process history and compare v5 with v6. The canary step added after an incident shows as new lines.
  3. Save the same page twice: Open one page in two windows and save both. The second save offers Merge or Overwrite, and both texts stay in the history.

Search, AI, and access control

Add semantic search, work with embeddings, and keep access scoped to the right users.

Vector search

A native VECTOR type and VECTOR_DISTANCE. Store embeddings next to the rows they describe.

Vector docs

Embeddings in T-SQL

Generate and chunk from inside the database with external model calls. No separate pipeline.

AI_GENERATE_EMBEDDINGS

RAG, end to end

Chunk, embed, store, and retrieve content in Azure SQL to ground responses in your application.

Copy the RAG prompt

Access scoped to each user

Use Microsoft Entra identity and row-level security to keep each tenant's data separate.

Row-level security docs

Microsoft SQL Agent Skills

Building with a coding agent? Add Azure SQL guidance to the tools you already use.

claude plugin marketplace add microsoft/microsoft-sql claude plugin install microsoft-sql@microsoft-sql

Then just ask:

Build with the tools you know.

GitHub Copilot

Write and explain SQL queries.

Explore SQL capabilities

VS Code + MSSQL

Design schemas and query your data.

Explore the extension

SQL Server Management Studio

Inspect query plans and troubleshoot.

Explore SSMS

Before you build

Is it safe to let an AI coding agent write to my Azure SQL database?

Yes, on a development database with least-privilege access. The Microsoft SQL Agent Skills default to parameterised queries, Microsoft Entra sign-in, and row-level security for multi-tenant apps.

Is Azure SQL Database free to start?

Yes. The Azure SQL Database free offer includes 100,000 vCore seconds of compute and 32 GB of data storage every month.

What do I need to build an app on Azure SQL with a coding agent?

You need an Azure account, a free Azure SQL database, and a coding agent.

Which AI coding agents work with Azure SQL?

The Microsoft SQL Agent Skills work with Claude Code, GitHub Copilot, Codex, and Cursor. The Azure SQL Developer Hub app templates use your stack, or TypeScript and Node.