sql-server-dba
Skill9 starsChanged 48 days agoMITView on GitHub
Diagnose SQL Server and Azure SQL with safe native evidence
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ElGenius-developer/ai-skillstheir own version, first seen Nov 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ElGenius-developer/ai-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- labs/01-azure-operations/resources/grubify/.github/copilot-instructions.mdCopilot instructions
- azure-sre-agentSkill
- frontend-designSkill
- grillingSkill
- humanize-contentSkill
- rvap-brandSkill
- rvas-contentSkill
- skill-creatorSkill
- writing-for-agentsSkill
- rvas-sre-agent-jumpstartSkill
- azure-change-digestSkill
- azure-finops-reviewSkill
- databricks-dependency-liveSkill
- defender-cloud-liveSkill
- service-health-liveSkill
- rbac-privileged-access-reviewSkill
- entra-full-credential-inventorySkill
- infra-ops-liveSkill
- aks-waf-liveSkill
- azure-backup-liveSkill
- patching-investigation-liveSkill
- operations-digest-liveSkill
- fabric-chargeback-liveSkill
- sqlmi-maintenance-resilienceSkill
- sre-usecase-builderSkill
- 0001-no-productsSkill
- 0001-iwcSkill
- 0001-vntSkill
- validated-fixtureSkill
- 0003-skill-onlySkill
- exampleSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
43 rules. About 0 are common, 33 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈33
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use native SQL Server and Azure SQL capabilities to discover database structure, monitor health, troubleshoot incidents, identify …
- Distinctive: line 19
Before querying a target, require:
- Very specific: line 38
Use only these sqlserver-mcp tools for live database work:
- Distinctive: line 47
Do not use ODBC, pyodbc, sqlcmd, Azure CLI, PowerShell, Python, shell commands, language drivers, generated programs, or another connector …
- Distinctive: line 51
Do not install packages, drivers, or command-line utilities.
- Distinctive: line 54
If the connector or required profile is unavailable, stop and report the missing capability.
- Very specific: line 62
Call list_profiles and select the named target profile.
- Distinctive: line 66
Run bounded native metadata and diagnostic queries.
- Very specific: line 75
Use only the configured sqlserver-mcp profile
- Distinctive: line 78
Do not request, display, cache, or pass a raw token in conversation
- Distinctive: line 80
Never use the SQL-authenticated administrator
- Very specific: line 84
Use only a named profile on the same sqlserver-mcp connector
- Distinctive: line 85
Do not assume that the Azure SRE Agent UAMI is accepted outside Azure SQL
- Distinctive: line 86
Stop when network reachability, trust, or authentication is unresolved
- Distinctive: line 88
After connecting, collect only the identifiers needed to choose supported queries:
- Distinctive: line 100
Do not run server-scoped queries until the platform and effective permissions show that they are available.
- Very specific: line 107
Use run_query with native catalog views to discover:
- Very specific: line 117
Do not sample business data unless the user asks and the sample is necessary.
- Very specific: line 118
Use get_object when details for one known relation or routine are sufficient.
- Distinctive: line 125
Wait type, wait duration, blocking session, and resource
- Distinctive: line 136
Use Query Store when it is enabled and readable:
- Distinctive: line 141
Consider parameter-sensitive behavior and workload shifts
- Distinctive: line 144
If Query Store is unavailable, use live and cached evidence and state that the historical conclusion is limited.
- Distinctive: line 161
Wait statistics identify where time accumulated, not root cause by themselves.
- Very specific: line 167
When evidence points to query-plan quality, use analyze_query for an estimated plan:
- Distinctive: line 171
Check estimates, predicates, join strategies, conversions, spills, and memory grants
- Distinctive: line 173
Check whether parameter values or plan changes explain the behavior
- Distinctive: line 175
Treat missing-index DMVs as cumulative, volatile suggestions
- Distinctive: line 176
Consider write cost, storage, overlap, selectivity, and maintenance cost
- Distinctive: line 177
Check statistics metadata and modification counters before attributing stale estimates to statistics
- Distinctive: line 190
Use read-only statements and native system objects
- Very specific: line 193
Add TOP, time ranges, database filters, or object filters where applicable
- Distinctive: line 194
Avoid broad plan-cache extraction and unbounded XML plan retrieval
- Very specific: line 195
Use LIMITED or narrowly scoped modes for expensive physical-statistics functions
- Distinctive: line 197
Avoid scanning application tables unless the user request requires it
- Distinctive: line 198
Do not execute application stored procedures
- Distinctive: line 199
Do not expose credentials, tokens, sensitive query parameters, or business data in the response
- Distinctive: line 234
Do not claim that a recommendation resolves an issue until a controlled change and post-change measurement demonstrate the result.
- Distinctive: line 244
Recommendations: read-only next steps or proposed changes with tradeoffs
- Distinctive: line 248
When no bottleneck is demonstrated, say so and identify the observation window and evidence reviewed.
- Distinctive: line 253
If authentication fails, distinguish:
- Distinctive: line 267
If a system object or column is unavailable, verify the engine, version, and platform-specific documentation.
- Distinctive: line 271
If evidence is empty, check capture state, reset time, filters, permissions, and workload activity before concluding that the condition did …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SQL Server DBA
Overview
Use native SQL Server and Azure SQL capabilities to discover database structure, monitor health, troubleshoot incidents, identify performance bottlenecks, and produce evidence-based tuning recommendations.
This skill is read-only and platform-aware. It does not create database helper objects or treat a recommendation as permission to apply a change.
Prerequisites
Before querying a target, require:
- The
sqlserver-mcpconnector assigned explicitly to the custom agent - An explicit server or service endpoint and database name
- A permitted observation scope and time window
- Required database and performance-state permissions
For Azure SQL, use the Azure SRE Agent user-assigned managed identity through
the sqlserver-mcp connection. The MCP workload identity must exist as a
contained Microsoft Entra user in the target database and hold the approved
read-only role. Azure RBAC alone does not grant SQL data-plane access.
For SQL Server outside Azure SQL, use only an approved connection and
authentication profile exposed by sqlserver-mcp. If none exists, report the
missing prerequisite. Never substitute the SQL administrator, request a
password, or invent another authentication method.
Exclusive Tool Contract
Use only these sqlserver-mcp tools for live database work:
| Tool | Use |
list_profiles | Discover allowlisted targets and select the correct profile |
get_object | Retrieve native metadata for one relation or routine |
run_query | Run bounded, parameterized, parser-validated read-only T-SQL |
analyze_query | Compile and summarize an estimated execution plan without running workload |
Do not use ODBC, pyodbc, sqlcmd, Azure CLI, PowerShell, Python, shell commands, language drivers, generated programs, or another connector to open or query a database.
Do not install packages, drivers, or command-line utilities. Do not construct or handle connection strings, passwords, or access tokens.
If the connector or required profile is unavailable, stop and report the missing capability. A failed MCP call is evidence to troubleshoot, not permission to attempt another connection path.
Quick Start
- Confirm the target server, database, user objective, incident time window, and whether production query execution is permitted.
- Call
list_profilesand select the named target profile. - Identify the engine edition, product version, database, compatibility level,
and available permissions with a bounded
run_querycall. - Select the smallest diagnostic path that answers the request.
- Run bounded native metadata and diagnostic queries.
- Correlate evidence before identifying a cause.
- Report findings, limitations, recommendations, and confirmation that no changes were applied.
Connection and Capability Discovery
For Azure SQL:
- Use only the configured
sqlserver-mcpprofile - Require the logical server fully qualified domain name and database name
- Let the MCP service acquire and apply the Azure SQL token
- Do not request, display, cache, or pass a raw token in conversation
- Rely on the MCP connection policy for encryption and certificate validation
- Never use the SQL-authenticated administrator
For other SQL Server deployments:
- Use only a named profile on the same
sqlserver-mcpconnector - Do not assume that the Azure SRE Agent UAMI is accepted outside Azure SQL
- Stop when network reachability, trust, or authentication is unresolved
After connecting, collect only the identifiers needed to choose supported queries:
SERVERPROPERTY('EngineEdition')SERVERPROPERTY('ProductVersion')SERVERPROPERTY('ProductLevel')SERVERPROPERTY('Edition')DB_NAME()- Database compatibility level
- Query Store state
- Effective database performance-state permissions
Do not run server-scoped queries until the platform and effective permissions show that they are available.
Diagnostic Workflow
Understand database structure
Use run_query with native catalog views to discover:
- Schemas, tables, views, and programmable objects
- Columns, data types, nullability, defaults, and computed columns
- Primary keys, unique constraints, checks, and foreign keys
- Index keys, included columns, filters, and disabled state
- Declared dependencies between objects
Build entity relationships from declared primary and foreign keys. Label
relationships inferred from naming or query behavior as inferred, not declared.
Do not sample business data unless the user asks and the sample is necessary.
Use get_object when details for one known relation or routine are sufficient.
Establish current activity
Inspect bounded current activity for:
- Active requests and sessions
- Wait type, wait duration, blocking session, and resource
- Open transactions and transaction age
- Locks involved in an active blocking chain
- Query text and available plans
- Memory grants and spills where evidence exists
Capture observation timestamps in UTC. Current-state DMVs are point-in-time evidence and must not be described as historical trends.
Analyze historical query performance
Use Query Store when it is enabled and readable:
- Compare runtime intervals rather than lifetime averages alone
- Identify regressions in duration, CPU, reads, writes, and execution count
- Compare plans and plan changes for the same query
- Consider parameter-sensitive behavior and workload shifts
- Record Query Store capture state and observation interval
If Query Store is unavailable, use live and cached evidence and state that the historical conclusion is limited. Do not enable or reconfigure Query Store.
Investigate resource bottlenecks
Correlate workload evidence across relevant categories:
- CPU pressure and expensive queries
- Data and log I/O latency
- Database and server waits
- Blocking, lock escalation, and deadlocks
- Memory grants, concurrency, and spills
- Tempdb usage and contention
- Transaction-log usage and long-running transactions
- Storage, database size, and growth
- Azure SQL resource-governance and service-tier limits
Wait statistics identify where time accumulated, not root cause by themselves. Account for scope, reset time, benign waits, platform filtering, and the observation window.
Evaluate plans, indexes, and statistics
When evidence points to query-plan quality, use analyze_query for an
estimated plan:
- Correlate estimated-plan evidence with Query Store or existing runtime data
- Check estimates, predicates, join strategies, conversions, spills, and memory grants
- Check whether parameter values or plan changes explain the behavior
- Evaluate existing indexes before proposing another one
- Treat missing-index DMVs as cumulative, volatile suggestions
- Consider write cost, storage, overlap, selectivity, and maintenance cost
- Check statistics metadata and modification counters before attributing stale estimates to statistics
analyze_query does not execute the submitted workload. Do not seek another
tool or connection method to obtain an actual plan.
See native diagnostics for the preferred system surfaces and platform notes.
Query Safety Rules
Apply these rules to every SQL query:
- Use read-only statements and native system objects
- Fully qualify system objects with the
sysschema - Select named columns instead of
SELECT *, especially from DMVs - Add
TOP, time ranges, database filters, or object filters where applicable - Avoid broad plan-cache extraction and unbounded XML plan retrieval
- Use
LIMITEDor narrowly scoped modes for expensive physical-statistics functions - Avoid scanning application tables unless the user request requires it
- Do not execute application stored procedures
- Do not expose credentials, tokens, sensitive query parameters, or business data in the response
Never execute:
INSERT,UPDATE,DELETE,MERGE, or bulk data operationsCREATE,ALTER,DROP,TRUNCATE, or permission changes- Index rebuilds, reorganizations, creation, or removal
- Statistics updates
- Query Store plan forcing, hints, capture changes, or cleanup
- Configuration changes, failovers, backup, restore, or maintenance commands
- Creation of monitoring views, procedures, tables, functions, jobs, or Extended Events sessions
Existing Extended Events sessions and targets may be read when the tool, platform, and permissions support safe access.
Evidence Standard
Classify every important statement as one of:
- Observation supported by returned evidence
- Interpretation consistent with the evidence
- Hypothesis requiring additional evidence
- Recommendation not yet applied
For each finding, record:
- Target and UTC observation window
- Native source and relevant identifiers
- Measured value or returned state
- Expected impact
- Alternative explanations
- Evidence needed to confirm the cause
Do not claim that a recommendation resolves an issue until a controlled change and post-change measurement demonstrate the result.
Response Format
Return:
- Scope: target, platform, database, time window, and permissions
- Findings: impact-ranked observations with native evidence
- Analysis: interpretation, correlations, and uncertainties
- Recommendations: read-only next steps or proposed changes with tradeoffs
- Limitations: unavailable evidence, permissions, or platform constraints
- Change status: state that no database changes were applied
When no bottleneck is demonstrated, say so and identify the observation window and evidence reviewed. Do not manufacture an issue to satisfy the request.
Troubleshooting
If authentication fails, distinguish:
- Azure SRE Agent to MCP managed identity or audience failure
- MCP target profile missing or unavailable
- Network or DNS reachability
- TLS or certificate validation
- Microsoft Entra token or identity failure
- Missing contained database user
- Login accepted but database access denied
- Required DMV permission denied
Return the exact failure without exposing secrets. Do not retry with broader credentials or another database client.
If a system object or column is unavailable, verify the engine, version, and platform-specific documentation. Use a supported alternative or report the limitation. Do not guess a replacement column.
If evidence is empty, check capture state, reset time, filters, permissions, and workload activity before concluding that the condition did not occur.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

