mssql-performance-revi…
Agentic offline orchestrator for end-to-end SQL Server performance reviews. Forms hypotheses from artifacts or symptoms, dispatches the specialised review…
Analyzes SQL Server ERRORLOG files for operational issues, availability group failures, memory pressure, I/O subsystem warnings, and security events. Use this skill whenever a SQL Server instance has experienced unexpected behavior, an AG failover, memory warnings, I/O latency
$ npx -y skills add vanterx/mssql-performance-skills --skill sqlerrorlog-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sqlerrorlog-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyzes SQL Server ERRORLOG files for operational issues, availability group failures, memory pressure, I/O subsystem warnings, and security events. Use this skill whenever a SQL Server instance has experienced unexpected behavior, an AG failover, memory warnings, I/O latency
name: sqlerrorlog-review description: Analyzes SQL Server ERRORLOG files for operational issues, availability group failures, memory pressure, I/O subsystem warnings, and security events. Use this skill whenever a SQL Server instance has experienced unexpected behavior, an AG failover, memory warnings, I/O latency alerts, or abnormal shutdown, and you need a structured timeline of what SQL Server recorded. Applies 33 checks (E1–E33) covering AG health, memory/resource pressure, I/O and storage, startup/shutdown, connectivity, configuration signals, and SQL 2019/2022 modern feature events. triggers: - /sqlerrorlog-review
Parse and analyze SQL Server ERRORLOG content to surface operational warnings, high-availability failures, resource pressure signals, security events, and configuration anomalies. Applies 33 checks (E1–E33) across six categories:
Accept any of:
`C:\Program Files\Microsoft SQL Server\MSSQL<ver>.<inst>\MSSQL\Log\ERRORLOG`)
For best results, provide the current ERRORLOG and at least one prior log (`ERRORLOG.1`). When only partial content is available, state which time range is covered.
-- Read current ERRORLOG (0 = current, 1 = previous, 2 = the one before that) EXEC xp_readerrorlog 0, 1; -- SQL Server log, current file EXEC xp_readerrorlog 1, 1; -- SQL Server log, previous file -- Filter to AG-related messages only EXEC xp_readerrorlog 0, 1, N'availability', NULL, NULL, NULL, N'desc'; -- Filter to a time window (last 2 hours) DECLARE @start DATETIME = DATEADD(HOUR, -2, GETDATE()); EXEC xp_readerrorlog 0, 1, NULL, NULL, @start, NULL, N'desc';
| Column | Meaning | |--------|---------| | LogDate | Timestamp of the log entry (datetime2 precision) | | ProcessInfo | SPID or system process (e.g., `spid28s`, `Logon`, `Backup`) | | Text | Log message text |
---
| Threshold | Value | Used by | |-----------|-------|---------| | Login failure burst — Warning | > 5 `Login failed` messages in any 5-min window | E22 | | Login failure burst — Critical | > 20 `Login failed` messages in any 5-min window | E22 | | Restart cycling | ≥ 2 SQL Server startup messages within 60 min | E21 | | I/O slow built-in threshold | 15 seconds (SQL Server internal, non-configurable) | E15 | | Log backup overdue — FULL/BULK_LOGGED | > 24 hr since last `Database backed up` entry | E18 | | Log backup overdue — active log pressure signal | > 8 hr when `log_reuse_wait_desc = LOG_BACKUP` | E18 |
---
in the same entry or within the same minute as a role-change message; also `in response to a request from the Windows Server Failover Cluster`
(unplanned loss of primary)
probable root causes. For planned failovers in unexpected windows, review change-management records. Run `/sqlwait-review` on HADR_SYNC_COMMIT and HADR_WORK_QUEUE waits.
Cluster has expired` or `The lease of availability group` combined with `has expired`
(non-yielding scheduler), or OS-level events. Common causes: storage latency spike causing the sp_server_diagnostics thread to miss its deadline, high CPU starvation, or WSFC network interruption. Increase `LeaseTimeout` in WSFC only as a temporary measure — fix the root cause.
`is preparing to transition to the`
transitions during business hours warrant investigation
If unplanned, check the Windows Event Log and WSFC cluster log for the triggering event.
database ... is not in the correct state`
synchronized, providing false HA coverage
`synchronization_state_desc` and `redo_queue_size`. If
SQL Server performance tuning skills for LLMs — 829 checks across 26 skills covering T-SQL, execution plans, wait stats, deadlocks, Query Store, indexes, encryption, Always On AG, WSFC, ERRORLOG, SPN, memory, disk I/O, config drift, setup logs, SSRS & migration readiness. Remote MCP server on Cloudflare Workers.
Repo: vanterx/mssql-performance-skills
Agentic offline orchestrator for end-to-end SQL Server performance reviews. Forms hypotheses from artifacts or symptoms, dispatches the specialised review…
Audits SQL Server Always On Availability Group configuration correctness across all layers — prerequisites, replica design, listener architecture, backup…
Analyze SQL Server lock blocking from sys.dm_exec_requests, sys.dm_exec_sessions, sys.dm_os_waiting_tasks, sys.dm_tran_locks, open-transaction DMVs, blocked…
Analyze SQL Server Setup Bootstrap log files to diagnose failed installations, failed Cumulative Update or Service Pack patching, failed cluster node…
Analyzes Windows Server Failover Cluster (WSFC) CLUSTER.LOG files for Always On Availability Group root-cause diagnosis. Use this skill when an availability…
Analyze SQL Server instance and database configuration drift against proven DBA best practices. Applies 29 checks (B1–B29) across five categories: parallelism…