capture-sqlserver-create skill
✓ VerifiedCreate a SQL Server CDC capture to enable real-time data streaming from various SQL Server environments using flowctl.
- GitHub stars
- 7
- Files
- 1
- Last commit
- Nov 4, 2026
- License
- Apache-2.0
- Allowed tools
- —
What does the capture-sqlserver-create skill do?
capture-sqlserver-create creates a SQL Server CDC capture to enable real-time data streaming from various SQL Server environments using flowctl.
Summary generated from the skill's SKILL.md.
About the capture-sqlserver-create skill
Setting up real-time data streaming from Microsoft SQL Server environments is the primary function of this skill. It assists developers and data engineers in configuring Change Data Capture to move data from self-hosted instances, Azure SQL, Amazon RDS SQL Server, or Google Cloud SQL into Estuary. The process involves using flowctl to manage the workflow, from discovering CDC-enabled tables to publishing the final capture specification.
An agent should load this skill when a user needs to connect an MSSQL database to a streaming pipeline. It relies on fetching official connector documentation via WebFetch to ensure correct prerequisites and configuration for specific cloud variants. The skill produces a flow.yaml file containing the necessary connector images and connection settings. It distinguishes itself by providing specific flowctl commands and troubleshooting steps for common CDC errors, such as missing SQL Server Agent jobs or LSN mismatches, which are often absent from standard documentation.
What an agent can do with it
- 1Configure SQL Server CDC streamingSet up a real-time data capture from an Amazon RDS SQL Server instance.
- 2Generate capture configuration filesBuild a flow.yaml file with the correct connector image and connection details for a specific SQL Server variant.
- 3Troubleshoot CDC connectivity issuesResolve errors where the SQL Server Agent is not running or CDC is not enabled on a specific table.
- 4Verify data streaming statusCheck if a capture has moved from the backfilling stage to a successful streaming state.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the capture-sqlserver-create skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the capture-sqlserver-create skill in Plugin
/plugin marketplace add estuary/agent-skills /plugin install estuary-captures@estuary
Install the capture-sqlserver-create skill in Claude Code
~/.claude/skills/capture-sqlserver-create/SKILL.md
$ npx degit estuary/agent-skills/skills/capture-sqlserver-create ~/.claude/skills/capture-sqlserver-createInstall the capture-sqlserver-create skill in Claude Code (project)
.claude/skills/capture-sqlserver-create/SKILL.md
$ npx degit estuary/agent-skills/skills/capture-sqlserver-create .claude/skills/capture-sqlserver-createInstall the capture-sqlserver-create skill in Codex
~/.agents/skills/capture-sqlserver-create/SKILL.md
$ npx degit estuary/agent-skills/skills/capture-sqlserver-create ~/.agents/skills/capture-sqlserver-createInstall the capture-sqlserver-create skill in Gemini CLI
~/.gemini/skills/capture-sqlserver-create/SKILL.md
$ npx degit estuary/agent-skills/skills/capture-sqlserver-create ~/.gemini/skills/capture-sqlserver-createInstall the capture-sqlserver-create skill in Claude.ai
npx degit estuary/agent-skills/skills/capture-sqlserver-create capture-sqlserver-create && zip -r capture-sqlserver-create.zip capture-sqlserver-create # claude.ai → Customize → Skills → + → Create skill → Upload a skill → capture-sqlserver-create.zip
Automated checks
Ran Nov 16, 2026Full report →Passed our automated checks. That is not a security audit: read the scripts before you let an agent run them. How checks work
- Source repository linked and reachableestuary/agent-skills/skills/capture-sqlserver-create is public and reachablegithub.com/estuary/agent-skills/tree/HEAD/skills/capture-sql ↗Pass
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit 2026-11-04github.com/estuary/agent-skills/commits ↗Pass
- No download-and-run or credential theft in scriptsNo scripts in the skill folderPass
- No hidden instructions in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/estuary/agent-skills/blob/HEAD/skills/capture-sql ↗Pass
- Pre-approved tools are scopedNo pre-approved tools; the agent asks before using onegithub.com/estuary/agent-skills/blob/HEAD/skills/capture-sql ↗Pass
- SKILL.md follows the Agent Skills formatValid name and description; says when to use it; 245 linesgithub.com/estuary/agent-skills/blob/HEAD/skills/capture-sql ↗Pass
SKILL.md
View on GitHubCreate SQL Server Capture
Create an Estuary capture from Microsoft SQL Server using Change Data Capture (CDC).
Applies to: source-sqlserver, source-amazon-rds-sqlserver, source-google-cloud-sql-sqlserver, source-azure-sqlserver
Step 0: Load Connector Documentation
Before proceeding, fetch the official connector docs for prerequisites, config reference, and cloud-specific setup.
Always load the main page: https://docs.estuary.dev/reference/Connectors/capture-connectors/SQLServer/
Then load the variant subpage based on the user's SQL Server type:
| Variant | Docs URL |
|---|---|
| Self-hosted SQL Server | Main page covers this |
| Azure SQL Database | Main page covers this |
| Amazon RDS SQL Server | https://docs.estuary.dev/reference/Connectors/capture-connectors/SQLServer/amazon-rds-sqlserver/ |
| Google Cloud SQL | https://docs.estuary.dev/reference/Connectors/capture-connectors/SQLServer/google-cloud-sql-sqlserver/ |
Use WebFetch to load these pages. Together they cover:
- Prerequisites (CDC enable at database and table level, user permissions)
- Full config property reference
- Cloud-specific setup instructions
- SSH tunnel configuration
- Network access / IP allowlisting
This skill provides the flowctl workflow and troubleshooting that docs don't cover.
Step 1: Gather Requirements
Before writing any YAML, ask the user:
- SQL Server variant? — Self-hosted, Azure SQL Database, Amazon RDS, or Google Cloud SQL
- Edition? — CDC requires Enterprise, Developer, or Evaluation (not Standard/Express). Azure SQL supports all tiers.
- Network path? — Direct connection (cloud with IP allowlist), SSH tunnel (private network), Private Link (AWS/Azure/GCP), or ngrok (local dev)
- Non-default data plane? — Most users use the default. Ask if they need a non-default data plane.
- Tables to capture? — Which specific tables (CDC must be enabled per table)
- History mode? — Standard CDC (
false) or full event history (true)
Step 2: Find the Correct Connector Version
Always use the latest numbered version tag. Query the connector registry to find it:
flowctl raw get --table connector_tags \
--query 'documentation_url=ilike.*source-sqlserver*' \
--query 'select=image_tag,documentation_url' \
--output yaml
Choose the connector image:
| Variant | Connector Image |
|---|---|
| Self-hosted / Azure SQL | ghcr.io/estuary/source-sqlserver |
| Amazon RDS SQL Server | ghcr.io/estuary/source-amazon-rds-sqlserver |
| Google Cloud SQL | ghcr.io/estuary/source-google-cloud-sql-sqlserver |
Step 3: Help User Complete Prerequisites
Walk the user through prerequisites from the docs loaded in Step 0. SQL Server CDC setup is more involved than other databases:
- SQL Server Agent MUST be running — The Agent runs CDC capture/cleanup jobs. Without it, CDC data won't be processed. Azure SQL doesn't need this (managed automatically).
- Enable CDC on database — The command varies by platform:
- Standard:
EXEC sys.sp_cdc_enable_db; - RDS:
EXEC msdb.dbo.rds_cdc_enable_db '<db>'; - Cloud SQL:
EXEC msdb.dbo.gcloudsql_cdc_enable_db '<db>';
- Standard:
- Enable CDC on each table — Must be done individually per table
- User permissions — SELECT on dbo and cdc schemas, VIEW DATABASE STATE
Step 4: Create the Capture Spec File
Build flow.yaml using the config reference from the docs. Minimal required config:
captures:
<tenant>/<path>/source-sqlserver:
endpoint:
connector:
image: ghcr.io/estuary/source-sqlserver:<version>
config:
address: "<host>:1433"
database: "<database>"
user: "<username>"
password: "<password>"
historyMode: false
bindings: []
For SSH tunnel, add networkTunnel.sshForwarding block — see docs for full config.
Step 5: Discover and Publish
# Discover CDC-enabled tables
flowctl discover --source flow.yaml
# Review the generated bindings
cat flow.yaml
# Publish the capture
flowctl catalog publish --source flow.yaml --auto-approve
Note: Only tables with CDC enabled will appear in discovery results. If a table is missing, it needs CDC enabled first.
Step 6: Verify
# Check status (expect PENDING → BACKFILLING → OK: Streaming CDC Events)
flowctl catalog status <tenant>/<path>/source-sqlserver
# View recent logs
flowctl logs --task <tenant>/<path>/source-sqlserver --since 5m | jq -c '{ts, message}'
# Read captured data
flowctl collections read --collection <tenant>/<path>/dbo/<table> | head -10
Status progression:
PENDING— normal for ~30 seconds during shard assignmentBACKFILLING— initial table snapshotsOK: Streaming CDC Events— CDC running normally
Troubleshooting
"CDC is not enabled for the database"
Cause: Database-level CDC not enabled
Fix: Run the appropriate enable command for your platform (see Step 3).
"table has no capture instances"
Cause: CDC not enabled on the specific table
Fix:
EXEC sys.sp_cdc_enable_table
@source_schema = 'dbo',
@source_name = 'your_table',
@role_name = 'flow_capture',
@supports_net_changes = 1;
"no valid capture instances for stream"
Cause: Table was dropped and recreated, CDC capture instance has newer start LSN
Fix: Increment backfill counter on the binding:
bindings:
- resource:
namespace: dbo
stream: your_table
backfill: 1 # Increment this
target: tenant/path/dbo/your_table
"maximum CDC LSN is currently unset"
Cause: SQL Server Agent is not running, CDC jobs aren't processing
Fix: Start SQL Server Agent service. Verify jobs exist: EXEC sys.sp_cdc_help_jobs;
"CDC worker may not be running" or fence position errors
Cause: CDC capture job is missing, stopped, or broken
Diagnostic:
SELECT name, is_cdc_enabled FROM sys.databases WHERE name = DB_NAME();
EXEC sys.sp_cdc_help_jobs;
SELECT * FROM sys.dm_cdc_log_scan_sessions ORDER BY start_time DESC;
Fix: If jobs missing, recreate:
EXEC sys.sp_cdc_add_job @job_type = 'capture';
EXEC sys.sp_cdc_add_job @job_type = 'cleanup';
"invalid '__$start_lsn' value"
Cause: CDC role_name mismatch — user not in the correct role
Fix: Check role and add user:
SELECT capture_instance, role_name FROM cdc.change_tables;
EXEC sp_addrolemember '<role_name>', 'flow_capture';
RoleName:'null' issue
Cause: Literal string "null" used as role_name instead of SQL NULL
Fix: Re-enable CDC with NULL role:
EXEC sys.sp_cdc_disable_table @source_schema = 'dbo', @source_name = 'table', @capture_instance = 'all';
EXEC sys.sp_cdc_enable_table @source_schema = 'dbo', @source_name = 'table', @role_name = NULL, @supports_net_changes = 1;
CDC partially enabled (broken state)
Symptoms: CDC commands fail with errors like "user cdc already exists"
Fix: Disable and re-enable CDC at database level:
EXEC sys.sp_cdc_disable_db;
EXEC sys.sp_cdc_enable_db;
-- Then re-enable on each table
Permission denied on dbo or cdc schema
Fix:
GRANT SELECT ON SCHEMA::dbo TO flow_capture;
GRANT SELECT ON SCHEMA::cdc TO flow_capture;
GRANT VIEW DATABASE STATE TO flow_capture;
Capture stuck in PENDING
Wait 30-60 seconds — this is normal during shard assignment. If still stuck:
flowctl logs --task <tenant>/<path>/source-sqlserver --since 5m | jq 'select(.level == "error" or .level == "warn")'
Related Skills
connector-disable-enable— Pause/restart existing capturesconnector-delete-recreate— Nuclear option for stuck capturesestuary-logs— Deep log analysisestuary-catalog-status— Status checking
Files in this skill
1capture-sqlserver-create skill questions
How do I install the capture-sqlserver-create skill in Claude Code?
Run npx degit estuary/agent-skills/skills/capture-sqlserver-create ~/.claude/skills/capture-sqlserver-create. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the capture-sqlserver-create skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What SQL Server editions support CDC?
CDC requires Enterprise, Developer, or Evaluation editions. Azure SQL supports all tiers.
How can I verify if my capture is working correctly?
You can check the status using flowctl catalog status and view recent logs or read captured data using flowctl logs and flowctl collections read.
Why is my table not appearing in the discovery results?
Only tables with CDC enabled will appear in discovery results. If a table is missing, you must enable CDC on that specific table first.