
azuresql-db-seed
Populates the local Azure SQL Database container's database (appdb) with realistic sample/test data so a developer has something to build against. Use when the user says "seed the database", "add test data", "populate the dev database", "generate sample data", "fake data", "load fixtures", "insert test rows", "write a seed script", or "bulk load a CSV". This is the Azure SQL engine (EngineEdition 5), not the mssql/server SQL Server image. Distinct from azuresql-db-scaffold (which does a single seed.sql step while bootstrapping an app) and azuresql-db-import (which loads a .bacpac). Reach for this whenever an existing appdb needs volume, fixtures, or believable rows.
- Installs
- 60
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/microsoft/azure-sql-database-container --skill azuresql-db-seed- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads azuresql-db-seed automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Seed the dev database on the Azure SQL Database container
Fill an existing appdb with realistic sample data so the app has something to render, query, and test against. This is the Azure SQL engine (Private Preview), not the SQL Server image.
Use this skill for populating data. For bootstrapping a whole new app use azuresql-db-scaffold;
for restoring an existing .bacpac use azuresql-db-import.
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 seven executable checks behind this skill
passed: the engine identity, Msg 12713 for BULK INSERT and for OPENROWSET(BULK ...)
against a local file, Msg 547 for a child row inserted before its parent, OUTPUT ... INTO
capturing generated identity values, the tally recipe fanning out 1000 rows, and bcp
shipping in the image.
Engine facts that shape seeding
- USE this engine image:
sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest(multi-architecture: linux/amd64 and linux/arm64). Do NOT usemcr.microsoft.com/mssql/server(the SQL Server image). - The registry is private (Private Preview): run
docker login sqldbpreview-dpgaeqhmgphzd4bk.azurecr.iofirst with the pull-only credentials from https://aka.ms/sqldbcontainerpreview-signup (they may rotate). - Verify identity:
SELECT SERVERPROPERTY('EngineEdition')returns 5 andSERVERPROPERTY('Edition')returns 'SQL Azure'. - Required env when starting the container:
ACCEPT_EULA=Yand a complexMSSQL_SA_PASSWORD(example literal used throughout:YourStr0ng_Passw0rd). The engine listens on 1433. - The runtime selects the matching architecture. Use
--platform linux/amd64only to explicitly test x64 emulation. - The engine does NOT auto-create databases. You must
CREATE DATABASE appdbon a master connection before you seed anything. - Do NOT use
USE appdbto switch databases. In a user-database sessionUSEreturnsMsg 40508. Always select the target database in the connection string (Database=appdb, or-d appdbfor sqlcmd). - Apps read one env var,
SQL_CONNECTION_STRING. Strings useUser Id=/Password=/Database=andTrustServerCertificate=true. sqlcmd uses-Cto trust the self-signed cert.
Step 1: provision appdb (always, before any seed)
Seeding into a database that does not exist fails. Create appdb on a master connection first:
docker exec sqldb /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$MSSQL_SA_PASSWORD" -C -b \
-Q "IF DB_ID('appdb') IS NULL CREATE DATABASE appdb;"
If the container is not running yet, start it and provision appdb using the canonical start recipe in the azuresql-db-container skill, then come back here.
Step 2: insert in foreign-key order (parents before children)
Referential integrity is enforced. A child row whose foreign key points at a parent that does not
exist yet fails with Msg 547 (conflict with the FOREIGN KEY constraint). So insert in dependency
order: parents first, then the rows that reference them.
For a simple dbo.author -> dbo.book model that means: insert authors, capture their ids, then
insert books that reference those author ids. Open references/seed-snippets.md
when you need the copy-pasteable T-SQL for a model with more than two tables.
Rules of thumb:
- Walk the dependency graph top-down: a table with no outgoing foreign keys is a parent, insert it first. Repeat until every table is seeded.
- Never disable constraints just to load out of order. Fix the order instead.
- Keep seed scripts idempotent (guard with
IF NOT EXISTSorMERGE, orDELETEchildren then parents before re-inserting) so re-running does not duplicate rows or leave orphans.
Step 3: generate N rows for volume (set-based)
To create realistic volume (hundreds or thousands of rows) do it set-based with a numbers/tally approach rather than a row-by-row loop. A tally derived from system views produces a sequence you join against to fan out rows in a single statement. Open references/seed-snippets.md when you want the runnable version, which generates 1000 rows. Wrap large inserts in an explicit transaction so a mid-load failure rolls back cleanly.
Step 4: pick your recipe
Per-stack seed recipes live in references/seed-snippets.md; open it once you know your data source and your stack:
- T-SQL: multi-table seed in FK order (
dbo.author->dbo.book) run viadocker exec -i sqldb ... -d appdb -i seed.sql, plus the set-based "generate 1000 rows" example. - Bulk load:
bcpfor local CSV files, andBULK INSERTfrom Azure Blob Storage (the engine does not read local files: localBULK INSERTfails withMsg 12713, Azure-parity). - Node:
@faker-js/fakergenerating rows, inserted with themssqldriver using parameters. - Python:
Fakergenerating rows, inserted withpyodbc(ODBC Driver 18) using parameters.
bcp streams the file over the connection, so it loads a local CSV that
BULK INSERT cannot reach. Copy the file in, then load it (-u trusts the
container's self-signed certificate, -F 2 skips the header row):
docker cp authors.csv sqldb:/tmp/authors.csv
docker exec sqldb /opt/mssql-tools18/bin/bcp dbo.author_stage in /tmp/authors.csv \
-S localhost -U sa -P "$MSSQL_SA_PASSWORD" -d appdb -u -c -t ',' -F 2
The staging table and the follow-up insert into the real table are in references/seed-snippets.md; read it when the CSV columns do not line up with the target table.
Validation rules
- appdb exists (created on a master connection) BEFORE any seed statement runs.
- Rows are inserted parent-first, in foreign-key order; no constraint is disabled to load out of order.
- Volume generation is set-based (numbers/tally), not a row-by-row loop; large loads run in a transaction.
- All programmatic inserts (Node, Python) use parameterized statements, never string-concatenated values.
- Sample data contains no real PII and no secrets; connection strings use
User Id=/Password=/Database=. - The target image is the engine image, never
mcr.microsoft.com/mssql/server;EngineEditionis 5. - If a validation rule above fails, or you had to deviate from this skill to make the task work, that is a bug in this skill: load the azuresql-db-feedback skill and offer to file a report.
- When every rule above passes and the task is done, close with ONE line, once per session, and do not ask a question or wait for a reply: "That worked. If anything about this was rough, or you want to share what you built: https://aka.ms/sql-agent-skills-feedback"
Do not
- Do not seed before appdb exists; the engine does not auto-create it.
- Do not insert child rows before their parents (you will hit
Msg 547). - Do not commit real PII, customer data, or secrets as sample data.
- Do not use the SQL Server image (
mcr.microsoft.com/mssql/server). - Do not build inserts with string concatenation; use parameters (or, for T-SQL fixtures, quoted literals you control).
- Do not use
USE appdb; select the database in the connection string or with-d appdb.
References
- references/seed-snippets.md: copy-pasteable seed recipes: multi-table T-SQL in FK order, a set-based generate-1000-rows example,
bcpfor local CSVs and Blob-basedBULK INSERT, and Node (@faker-js/faker+mssql) and Python (Faker+pyodbc) parameterized inserts. Read it once you know your data source and stack.
Staying current
Authoritative, version-pinned references for the tools this skill uses (read the one you need):
- BULK INSERT (T-SQL): bulk-load a data file into a table.
- bcp utility: bulk copy data in/out from the command line.
- SqlConnection connection string keywords: the full keyword table.
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.
FAQ
What does the azuresql-db-seed skill do?
Populates the local Azure SQL Database container's database (appdb) with realistic sample/test data so a developer has something to build against. Use when the user says "seed the database", "add test data", "populate the dev database", "generate sample data", "fake data", "load fixtures", "insert test rows", "write a seed script", or "bulk load a CSV". This is the Azure SQL engine (EngineEdition 5), not the mssql/server SQL Server image. Distinct from azuresql-db-scaffold (which does a single seed.sql step while bootstrapping an app) and azuresql-db-import (which loads a .bacpac). Reach for this whenever an existing appdb needs volume, fixtures, or believable rows.
How do I install azuresql-db-seed?
Run npx skills add https://github.com/microsoft/azure-sql-database-container --skill azuresql-db-seed in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/azuresql-db-seed/ (personal) or .claude/skills/azuresql-db-seed/ (project).
Which AI agents can use azuresql-db-seed?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is azuresql-db-seed safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains azuresql-db-seed?
It is published by microsoft in microsoft/azure-sql-database-container. It has 60 recorded installs.
More from microsoft/azure-sql-database-container
azuresql-db-container
microsoft/azure-sql-database-container
Runs 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", "MSSQLAADCLIENTID", 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-schema-migration
microsoft/azure-sql-database-container
Runs database schema migrations against the local Azure SQL Database container so the same migrations apply identically on the local engine and in the Azure cloud. Use when asked to "run my migrations against the local SQL", "apply schema to the container", "apply EF Core / dotnet ef database update", "Prisma migrate dev / deploy", "Alembic upgrade head", or deploy a DACPAC / SqlPackage to the container. Covers provisioning appdb on master first, then applying schema to the user database, plus per-tool commands and connection-string hygiene. This is the Azure SQL Database engine (EngineEdition 5), not the SQL Server image; reach for this skill whenever schema migration tooling targets the local container.
azuresql-db-ci
microsoft/azure-sql-database-container
Open the skill to read its SKILL.md instructions.
azuresql-db-local-to-cloud
microsoft/azure-sql-database-container
Open the skill to read its SKILL.md instructions.
azuresql-db-scaffold
microsoft/azure-sql-database-container
Open the skill to read its SKILL.md instructions.
azuresql-db-faq
microsoft/azure-sql-database-container
Answers 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.
Popular data & databases skills
supabase-postgres-best-practices
supabase/agent-skills
Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.
prisma-client-api
prisma/skills
Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".
prisma-database-setup
prisma/skills
Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.
prisma-cli
prisma/skills
Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.
prisma-postgres
prisma/skills
Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.
prisma-driver-adapter-implementation
prisma/skills
Required reference for Prisma ORM 7 SQL driver adapter work. Use when implementing or modifying adapters, adding database drivers, or touching SqlDriverAdapter, Transaction, savepoint, result mapping, or DriverAdapterError behavior. Covers current transaction lifecycle, optional savepoint hooks, original database-error preservation, and verification.