microsoft/microsoft-sql
Build and operate Azure SQL Database applications, from provisioning and secure connections through schema design, deployment, data movement, performance tuning, vector search, RAG, and local development with the Azure SQL Database container.
Use when wiring Azure Functions to Azure SQL Database: a serverless CRUD API with SQL input or output bindings, SqlTrigger on row changes, a SQL trigger that never fires, an output binding that updated instead of inserting.
Use when Azure SQL Database comes up without a specific task: what it can do today, GA or preview, which tier, tool or skill fits, current limits and defaults. Routes to the owning skill. Not Managed Instance or SQL Server.
Use when an app connects to the local Azure SQL Database container as sa: create a least-privilege user, choose auth per environment, keep the connection string out of source (user-secrets, Key Vault).
Use when CI (GitHub Actions, Azure Pipelines, GitLab) runs integration tests against the Azure SQL Database container as a service: health check, registry secrets. For Testcontainers, use azuresql-db-testing.
Use when hardening an app's data layer: connections drop or time out under load, add pooling and retry with backoff for transient faults, Max Pool Size. Also covers the local Azure SQL Database container.
Use when running Azure SQL Database or any SQL/mssql container locally for dev or CI: start it, connect with sqlcmd, Podman, won't start, Entra setup. Use instead of mcr.microsoft.com/mssql/server.
Use when asked for an API over existing tables ('give me an API for this database', REST and GraphQL without code), or to run a local Data API builder endpoint on the Azure SQL Database container.
Use when asking what the local Azure SQL Database container (Private Preview) supports or why it differs from the cloud: can I back up, why USE fails, can't create a vector index, SSMS errors.
Use when an azuresql-db-* skill or the Azure SQL Database container misbehaved, lacks something, or you worked around it: report a bug, file an issue, request a feature. Drafts a GitHub issue.
Use when a project runs mcr.microsoft.com/mssql/server in Docker or compose and local dev should behave like Azure SQL Database: switch to its container, flag SQL Server-only features.
Use when building a serverless CRUD API or reacting to row changes with Azure Functions on the local Azure SQL Database container: SQL bindings and trigger. For the cloud, use azure-functions-sql-bindings.
Use when loading an existing database into the local Azure SQL Database container: import a bacpac from prod, deploy a dacpac, bring my real schema and data local with SqlPackage.
Use when code built on the local Azure SQL Database container must run on Azure SQL Database: will this work in Azure, same code local and cloud, swap only the connection string, SA locally, Entra in cloud.
Use when storing embeddings or running similarity search, top-k or RAG on the local Azure SQL Database container with VECTOR(n) and VECTOR_DISTANCE, instead of pgvector, FAISS or a separate vector store.
Use when a new app (.NET Aspire, FastAPI, Next.js, NestJS) needs a local database: add a database, compose service, .env connection string, first migration. Uses the Azure SQL Database container.
Use when running migrations against the local Azure SQL Database container: dotnet ef database update, prisma migrate, alembic upgrade head, a dacpac publish, so they match Azure.
Use when the local Azure SQL Database container needs sample data: seed the database, test or fake data, fixtures, realistic rows across related tables, bulk load a CSV for development.
Use when adding the local Azure SQL Database container to an existing docker-compose or devcontainer.json: database service, healthcheck, depends_on, app waits for the database, appdb init.
Use when integration tests start the Azure SQL Database container from code with Testcontainers: xUnit, Jest or pytest with a real database, per-test fixture. For CI pipelines, use azuresql-db-ci.
Use when starting a new app on Azure SQL Database: choose a stack and go from resource group to first request without storing a password.
Use when loading a large file or many rows into an Azure SQL Database table fast: bulk insert a CSV, bcp, SqlBulkCopy, fast_executemany, BULK INSERT or OPENROWSET refusing a local file (Msg 12713), LOG_RATE_GOVERNOR.
Use when connecting a .NET app to Azure SQL Database with Microsoft.Data.SqlClient: packages, connection string, pooling, managed identity or Active Directory Default failing. For EF Core, use ef-core-azure-sql.
Use when connecting Python to Azure SQL Database: mssql-python or pyodbc, the ODBC driver, 'data source name not found', driver missing in a container image, Entra tokens. For SQLAlchemy, use sqlalchemy-azure-sql.
Use when connecting Node.js or TypeScript to Azure SQL Database with mssql: pool setup, an API slowing or out of connections under load, passwordless Entra ID, typed results. For Prisma, use prisma-azure-sql.
Use when connecting an app to Azure SQL Database: which driver, what goes in the connection string, retry, a first connection that fails then works (40613), certificate errors or TrustServerCertificate.
Use when connecting an AI agent to a hosted Data API builder MCP endpoint, writing its server description, making its tools read-only, or diagnosing role, tool, permission or session failures, including describe_entities reporting 'no entities configured' for a configured endpoint.
Use when a Data API builder config may expose more than intended, or to set roles and inheritance, row policies, relationships, a passwordless Azure SQL connection, or autoentities patterns that replace hundreds of hand-written entities in dab-config.json.
Use when deploying an app and its Azure SQL Database with azd: azd up, which template to start from, no password in the deployment, or deploy succeeded but the first database call fails to log in.
Use when deploying Data API builder to Azure Container Apps, or a deployed DAB app shows identity, health (403), host (MCP 403), scaling or startup failures.
Use when creating, reviewing or porting tables for Azure SQL Database: key and string lengths, collation, identity gaps. Has verified behavior common answers miss, e.g. a unique index on nvarchar(1000) builds with only a warning.
Use when starting from the microsoft/azuresql-devcontainers templates (.NET, Aspire, Node, Python) or they misbehave: empty database, schema not deployed, behaviour unlike Azure docs. Their database is SQL Server.
Use when EF Core targets Azure SQL Database: EnableRetryOnFailure, 'does not support user-initiated transactions', duplicate rows after a retry, UseAzureSql or UseSqlServer, AsSplitQuery, JSON columns.
Use when generating embeddings in Azure SQL Database or reviewing that setup: CREATE EXTERNAL MODEL, AI_GENERATE_EMBEDDINGS, Azure OpenAI from T-SQL. Has verified behavior common answers miss, e.g. the model DDL succeeds with a credential that can never work.
Use when setting up passwordless Microsoft Entra ID or managed identity access to Azure SQL Database or the container (CREATE USER FROM EXTERNAL PROVIDER), or it fails: Msg 33134, 18456 login failed, 4060.
Use when deploying schema to Azure SQL Database from GitHub Actions: azure/sql-action, dacpac publish, OIDC with no stored password, login failing after adding an environment, client IP or firewall errors.
Use when using LangChain or LlamaIndex with Azure SQL Database: SQL agent or text-to-SQL emits LIMIT, read-only agent, SQLDatabaseToolkit, langchain-sqlserver vector store, vector index refused.
Use when writing or reviewing dynamic SQL on Azure SQL Database for injection: sp_executesql vs EXEC, dynamic ORDER BY or table names. Has verified behavior common answers miss, e.g. QUOTENAME returns NULL past 128 characters.
Use when using Prisma with Azure SQL Database: schema.prisma, prisma migrate failing in Azure (P3020, shadow database), no Json type or enums, url unsupported in Prisma 7, driver adapter.
Use when creating an Azure SQL Database: a free SQL database in Azure, provision SQL for this app, give me a connection string, firewall rule, Entra-only admin, or created but nothing connects.
Use when choosing or moving to Hyperscale in Azure SQL Database: should I use Hyperscale, convert or move back, near 4 TB, vCores, serverless, read replicas, outgrowing the free offer.
Use when prototyping RAG offline on the local Azure SQL Database container with a local embedding model, no cloud account, or asking what changes when it moves to Azure. For a plain local build, use azuresql-db-rag.
Use when building a RAG pipeline end to end on Azure SQL Database: chat with my documents, semantic search over my data, keep embeddings in sync, answers worse after switching models, other tenants' chunks returned.
Use when reading an Azure SQL Database execution plan: what is expensive, why a scan, actual vs estimated rows, warnings, missing-index hints, getting the actual plan, a plan returned as NULL.
Use when Azure SQL Database data is lost: restore to before a bad deployment, a dropped table or database, point-in-time restore, geo-restore, long-term retention, RESTORE DATABASE refused.
Use when isolating tenants in a shared Azure SQL Database or checking isolation: row level security, SESSION_CONTEXT, rows leaking or vanishing. Has verified behavior common answers miss, e.g. a filter predicate alone lets a tenant write into another.
Use when asking if a schema change is safe on a live Azure SQL Database: add or alter a column, NOT NULL, deploys timing out, rollback. Has verified behavior common answers miss, e.g. a NEWID() default rewrites the table; a constant one doesn't.
Use when a Microsoft SQL skill, plugin or marketplace was wrong: bad steps, wrong skill fired, install failed, or you worked around it. Files a redacted bug report. The azuresql-db-* skills have their own feedback skill.
Use when building or publishing a SQL database project (.sqlproj, dacpac) for Azure SQL Database: build passes but publish fails, a renamed column lost data, deployment scripts, target platform.
Use when using SQLAlchemy or Alembic with Azure SQL Database: mssql+pyodbc URL, insert fails on a table with a trigger (OUTPUT clause), fast_executemany no faster, implicit_returning.
Use when moving a whole Azure SQL Database as a file with SqlPackage: export or import a bacpac, extract or publish a dacpac, copy between servers, dacpac vs bacpac, SQL71627 or SQL71659 failures.
Use when writing, porting or reviewing T-SQL for Azure SQL Database, or results look wrong with no error: NULLs, NOT IN, integer division. Has verified behavior common answers miss, e.g. the 'NULL eliminated' warning never reaches sqlcmd.
Use when storing, querying or reviewing JSON in Azure SQL Database: json type or nvarchar(max), OPENJSON, JSON_VALUE returning NULL. Has verified behavior common answers miss, e.g. nvarchar(max) silently stores invalid JSON.
Use when writing or reviewing an upsert or MERGE for Azure SQL Database: insert or update, ON CONFLICT, lost writes or 2627 under load. Has verified behavior common answers miss, e.g. a bare MERGE loses writes under concurrency.
Use when writing, reviewing or debugging vector search on Azure SQL Database: VECTOR_DISTANCE, VECTOR_SEARCH, vector index. Has verified behavior common answers miss, e.g. ORDER BY VECTOR_DISTANCE never uses the index. For RAG, use rag-on-azure-sql.