/microsoft-sql-admin:active-connectionsfrom Microsoft SQL administration
Analyzes active SQL Server connections: idle sessions, open transactions, connection pooling, and login/app distribution. Use when users ask who is connected or which sessions hold old transactions.
Ships in Microsoft SQL administration. 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.
Use this skill for active connections, current session analysis, or session-level connectivity diagnostics. It provides:
For clients that cannot connect at all, use the client-side troubleshooting guidance in references/report-template.md.
microsoft-sql-admin plugin (mssql_list_database_connections,
mssql_connect_database, then mssql_execute_query); any other SQL tool the agent host provides for
running T-SQL and reading result sets;
sqlcmd from a terminal. If the SQL
Tools MCP server is not connected or lists no connections, follow the sql-tools-mcp-setup skill,
which asks before installing or configuring anything. If no SQL tool can be made available, give the
user the T-SQL to run and ask for the results.VIEW SERVER PERFORMANCE STATE (VIEW SERVER STATE before SQL Server 2022) or, on Azure
SQL Database, VIEW DATABASE PERFORMANCE STATE or ##MS_ServerStateReader##, plus any other read
permission these queries need. A tool is only as read-only as the login it connects with.SELECT @@SERVERNAME, DB_NAME(), SUSER_SNAME(), SERVERPROPERTY('EngineEdition')); connect first if not already connected.| Parameter | Default | Description |
|---|---|---|
| TopN | 20 | Number of top results to return in each step |
| IdleThresholdMinutes | 30 | Minutes of inactivity before a session is flagged as idle |
| OpenTxnThresholdSeconds | 300 | Seconds an open transaction must be held to be flagged |
KILL <session_id>, ALTER DATABASE ... SET MULTI_USER,
ALTER USER ... WITH LOGIN, and DROP USER) are recommendations only.KILL rolls back the session's open transaction and cannot be
undone, and changing user_access affects every connection to the database.Execute the Step 1-10 queries from references/queries.md in order with the SQL query tool.
That reference contains the exact SQL, interpretation guidance, and "What to do" tables for each step.
Run the Step 1 query from references/queries.md.
Use it to confirm engine type, baseline session counts, and whether the target is an unsupported platform (Synapse editions 6/11) before continuing. Fabric SQL Database (edition 12) is supported.
Run the Step 2 query from references/queries.md.
Use it to identify which database, login, and program combinations dominate the current connection footprint.
Run the Step 3 query from references/queries.md.
Use it to find long-idle sleeping sessions, especially any session that is idle while still holding open transactions.
Run the Step 4 query from references/queries.md.
Use it to spot oversized pools, pool exhaustion, recent pool resets, and pooled connections that still carry open transactions.
Run the Step 5 query from references/queries.md.
Use it to identify dominant clients plus transport, encryption, authentication, and driver-version signals for each connection source.
Run the Step 6 query from references/queries.md.
Use it to isolate sessions with active transactions, prioritize sleeping sessions first, and measure duration plus log usage impact.
Run the Step 7 query from references/queries.md.
Use it to detect active MARS usage, MARS risk patterns, Azure SQL Proxy vs Redirect routing, and unencrypted connections.
Run the Step 8 query from references/queries.md.
Use it to verify the current database is online, writable when expected, and not restricted by state or access mode.
Run the Step 9 query from references/queries.md.
Use it to identify connection storms, rapid pool recycling, or sustained reconnection patterns over recent time buckets.
Run the Step 10 query from references/queries.md.
Use it to review principal types, contained users, Entra identities, and server-mapped users relevant to current connectivity.
After completing all ten steps, populate the report template in references/report-template.md.
Use the same reference for the root-cause decision tree and prioritized next-step recommendations.
If a client cannot connect at all, the failure happens before SQL Server creates a visible session, so DMVs will not show it.
Use the client-side checklist in references/report-template.md for DNS, ports, TLS, firewall, authentication, connection-string, and Azure SQL Connectivity Checker guidance.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub microsoft/microsoft-sql --plugin microsoft-sql-admin47 skills in this plugin
/always-encrypted-columnsUse when the user asks which plaintext columns can or should use Always Encrypted, or why a column is disqualified. Eligibility only: not for listing already-encrypted columns or their keys./authentication-diagnosticsUse when a login fails (18456, 'Login failed for user'), a user can't open a database, a permission is denied, or an Entra or managed identity login fails. For network errors, use `connectivity-troubleshoot`./backup-history-azuresqlUse when the user asks for backup history, the latest backups or backup retention on Azure SQL Database or Fabric SQL Database. For SQL Server or Managed Instance, use `backup-strategy-sqlserver`.Other plugins' skills for the same job