table-health-check
Installation
SKILL.md
Table Health Check
Use this skill when a user or DBA asks about table health, table corruption, consistency errors, suspect pages, table repair, tables with structural issues, or wants an overview of table quality in the current database.
The T-SQL in this skill targets the supported platforms listed below. Platform-specific commands (e.g. msdb.dbo.suspect_pages, DBCC CHECKTABLE repair options) are guarded by an EngineEdition check.
Prerequisites
- Must be connected to the target database.
- DMV checks can require
VIEW SERVER STATE/VIEW SERVER PERFORMANCE STATEon SQL Server orVIEW DATABASE STATE/VIEW DATABASE PERFORMANCE STATEon database-scoped platforms, depending on engine version and service tier. If a query is denied, report the denied permission and continue with checks that succeed. DBCC CHECKTABLErequires appropriate database permissions. Do not elevate permissions or execute any repair, index maintenance, or schema change as part of this diagnostic skill.