/azure-sql-database-container:azuresql-db-testingfrom azure-sql-database-container
Writes integration tests that spin up a real Azure SQL Database container per test or per suite using Testcontainers, then tears it down. Use instead of the SQL Server MsSql preset for the Azure SQL engine (EngineEdition 5).
Ships in azure-sql-database-container. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write integration tests that start a real Azure SQL Database container (Private Preview)
from code, provision appdb, run the test against it, and tear the container
down. This is the Azure SQL engine, not the SQL Server image.
This skill is about tests that manage their own engine lifecycle in-process (Testcontainers). It is DISTINCT from azuresql-db-ci, which wires the same engine into a CI pipeline as a service container via workflow YAML. If the goal is a CI job rather than in-code test setup, use azuresql-db-ci instead.
Verified on 2026-09-05 against the container image
sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest, reporting EngineEdition
5, Edition SQL Azure, build 12.0.2000.8. All six executable checks behind this skill
passed: the engine identity, Msg 40508 for USE, that the engine inside the container
listens on 1433 so a random mapped host port works, that connecting creates no database, the
native VECTOR(n) type, and the /opt/mssql-tools18/bin tools the wait strategy
invokes being present inside the image. The Testcontainers recipes themselves were not executed by that run.
sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latestMsSql preset / MsSqlContainer module, which
pulls mcr.microsoft.com/mssql/server (the SQL Server image). Start the engine image
above from a generic container instead.SELECT SERVERPROPERTY('EngineEdition') returns 5,
SERVERPROPERTY('Edition') returns 'SQL Azure'.linux/amd64 and linux/arm64; the runtime selects the
matching architecture. Set the platform to linux/amd64 only to explicitly
test x64 emulation (each language exposes this differently; see the snippets).For full engine detail (readiness, vectors, troubleshooting) see the azuresql-db-container skill.
The registry is private during Private Preview, so Testcontainers cannot pull the image until Docker is authenticated. Sign in once (or pre-pull) on the machine that runs the tests, before the test host tries to start the container:
docker login sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io # shared pull-only Private Preview creds
docker pull sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest # optional warm pull
Get the pull credentials by signing up at https://aka.ms/sqldbcontainerpreview-signup;
they may rotate, and the registry and tag are provisional during Private Preview. In CI,
run docker login as a step before the tests (see azuresql-db-ci).
SELECT 1 command wait) so
the test does not connect before the engine answers. Do not sleep a fixed amount.CREATE DATABASE appdb on a master connection before any test connects with
Database=appdb. Testcontainers gives you a container, not a database.USE to switch databases. In a user-database session USE returns
Msg 40508, exactly as in Azure SQL in the cloud. Select the database in the
connection string (Database=appdb). A master connection is for provisioning only.ACCEPT_EULA=Y and a complex
MSSQL_SA_PASSWORD (example literal: YourStr0ng_Passw0rd; at least 8 characters using
at least three of upper case, lower case, digits, and symbols). Expose container port
1433. The runtime selects the matching architecture automatically.Start returns only once the engine answers.appdb on a master connection (a SELECT 1 plus
IF DB_ID('appdb') IS NULL CREATE DATABASE appdb;).Server=localhost,<mappedPort>;Database=appdb;User Id=sa;Password=YourStr0ng_Passw0rd;TrustServerCertificate=true.
House style spells the keywords User Id= / Password= / Database=; Uid= / Pwd= are
documented SqlClient synonyms and work too. The command-line equivalent of
TrustServerCertificate=true is -C, as on the command line the
azuresql-db-container skill carries.Scope the container to the level you need: one per test suite/class for speed, or one per test for full isolation. Per-language recipes (wait strategy, appdb provisioning, connection string, dispose) live in references/testcontainers-snippets.md; open it once you know which language the tests are in:
IAsyncLifetime fixture.testcontainers + a Jest globalSetup / globalTeardown.testcontainers + a pytest fixture.@Container.Native VECTOR(n) column type and VECTOR_DISTANCE('cosine', a, b). Insert with
CAST(CAST(? AS NVARCHAR(MAX)) AS VECTOR(n)) where n is a LITERAL, never a bind
parameter (a parameter dimension fails with "Incorrect syntax near '@P3'").
MsSql preset
or mcr.microsoft.com/mssql/server.sleep.appdb is created on a master connection BEFORE any test connects with Database=appdb.User Id=/Password=/Database= and TrustServerCertificate=true.EngineEdition is 5 against the running container.MsSql preset image mcr.microsoft.com/mssql/server; start
the Azure SQL engine image via a generic container.appdb exists; provision it on a master connection first.USE appdb to switch databases; put it in the connection string.appdb provisioning, connection string from the mapped port, and dispose. Read the one for your test stack.Authoritative, version-pinned references for the tools this skill uses (read the one you need):
If the Microsoft Learn MCP server is configured, use mcp__microsoft-learn__microsoft_docs_search or mcp__microsoft-learn__microsoft_docs_fetch to fetch the current version of any of these on demand. It is optional; when it is unavailable, the references above are authoritative.
What SKILL.md sets; muted values are Claude Code's defaults
17 skills in this plugin
/azuresql-db-authConnects an app to the Azure SQL Database container securely, with a least-privilege database user instead of the sa login, the right auth method per environment, and safe handling of the connection secret. Use when a user asks "don't use sa in my app", "create a least-privilege database user", "app login for SQL", "which authentication should my app use", "secure the connection string", "Encrypt / TrustServerCertificate", "store the connection string in Key Vault", "dotnet user-secrets", "managed identity for Azure SQL", or "grant only the roles my app needs". SQL auth locally, Microsoft Entra or managed identity in the cloud, changing only the connection string. Reach for this before wiring an app to connect as sa, or before committing a connection string to source./azuresql-db-ciRuns integration tests against the Azure SQL Database container (Private Preview, local engine) in CI. Use when setting up GitHub Actions, Azure Pipelines, or GitLab CI to test against Azure SQL DB; when adding a database service container to a CI workflow; when tests need a real Azure SQL engine in the pipeline; or when you see "service container", "health-cmd", "ACR_USERNAME/ACR_PASSWORD", "MSSQL_SA_PASSWORD secret", or "integration test database". Also use when a workflow was about to pull the SQL Server image mcr.microsoft.com/mssql/server, in which case stop and use the Azure SQL Database engine image instead. Covers pulling from the private ACR with credentials, the service health check that runs sqlcmd inside the container so the runner needs no client tools, provisioning appdb before tests, and pointing the test connection string at the user database not master./azuresql-db-connectionsMakes an app's database connections reliable against the local Azure SQL Database container (Private Preview) and, unchanged, against Azure SQL Database in the cloud: connection pooling plus retry/transient-fault handling. Use when the user mentions "connection pooling", "retry logic", "transient fault", "retry on transient error", "EnableRetryOnFailure", "connection resiliency", "reliable connections", "pool size", "Max Pool Size", or says "the connection keeps dropping", "connections time out under load", "add backoff", or "make the DB layer resilient". This is the Azure SQL engine (EngineEdition 5), not the mssql/server SQL Server image. Reach for this whenever hardening a data-access layer that talks to SQL Server or Azure SQL./azuresql-db-containerRuns the Azure SQL Database container locally (Private Preview): the real PaaS engine where SERVERPROPERTY('EngineEdition') returns 5. This is NOT the SQL Server image mcr.microsoft.com/mssql/server. Use when a user wants to "run Azure SQL locally", "add a local SQL database", "add SQL Server to my docker compose", "spin up a local mssql container", "local SQL for development or CI", "connect with sqlcmd", "use Podman for SQL", "SQL container won't start", "Microsoft Entra authentication on the container", "MSSQL_AAD_CLIENT_ID", or asks "what's the connection string". Use even when the user does not name the container. If you were about to use mcr.microsoft.com/mssql/server, stop and use this skill instead. Hub skill: owns the shared references and routes to the task skills for compose, CI, seeding, vectors, and connection strings./azuresql-db-dabStands up an instant no-code REST + GraphQL API over the local Azure SQL Database container using Microsoft Data API Builder (DAB). Use when a user wants to "expose my table as an API", "add a REST API over the database", "generate a GraphQL API", "put an API in front of SQL", "CRUD API without writing code", or "dab init / dab-config.json". Also the way to serve a built-in MCP endpoint FROM the database via DAB (an API surface DAB provides, not a separate SQL MCP server). Prefer this over hand-writing a controller/ORM API when the user just needs REST or GraphQL over existing tables. Triggers include "Data API Builder", "dab start", "instant API over Azure SQL", "expose entities as REST/GraphQL". Reach for this even when the user only says "give me an API for this database"./azuresql-db-faqAnswers questions about what the Azure SQL Database container (Private Preview) can and cannot do, and WHY it differs from Azure SQL Database in the Microsoft Azure cloud. Use when a user asks "can I take a backup", "why does USE fail", "is X supported", "why can't I create a vector index", "why does SSMS error", "why isn't the image on Docker Hub", "what's different from the cloud", or hits behavior that does not match their Azure SQL Database expectations. Do NOT guess from general SQL Server / Azure knowledge: the container is a Private Preview product with specific gaps and a specific connection model. Read this skill, and link the user to the live Known limitations page for the current full list.Other plugins' skills for the same job
npx claudepluginhub microsoft/azure-sql-database-container --plugin azure-sql-database-container