tempdb-growth
Skill1 starsChanged 12 days agoMITView on GitHub
Diagnose unexpected tempdb data-file or transaction-log growth on SQL Server and Azure SQL Managed Instance. Use for tempdb filling up, space pressure, temporary object allocation, spills, version-store retention, long transactions, or growth during slow workloads, using troubleshoot/tempdb.
In this repository20 other files it gives its agents.
- nvidianimSkill
- zavahospitalSkill
- shift-handoffSkill
- adventureworksSkill
- auto-index-compactionSkill
- azure-sql-aiSkill
- debugging-sqlSkill
- inside-transaction-logSkill
- polybaseSkill
- powerapps-sqlSkill
- secure-scalable-db-appSkill
- sql-by-exampleSkill
- sql-linuxSkill
- sqlserver2022Skill
- sqlserver2025Skill
- sql-versioning-appsSkill
- sql-versioningSkill
- waits-latches-spinlocksSkill
- waits-latches-spinlocks-workshopSkill
- wardgeneralSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Read the diagnostic guide.
- Distinctive: line 16
Use the existing SQL connection/tool or SSMS/sqlcmd.
- Distinctive: line 19
Run space and IO first. Separate allocated file size, occupied categories, reusable extent space, and log occupancy.
- Distinctive: line 38
Stop on errors and report the failing script and permission/platform issue.
- Distinctive: line 39
Do not present partial or permission-limited results as a clean bill of health.
- Distinctive: line 46
If no approved connection is available, provide the execution order and request redacted results rather than claiming a diagnosis.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Diagnose unexpected tempdb growth
Procedure
- Read the diagnostic guide. Confirm SQL Server 2019+ or Azure SQL Managed Instance, the intended instance, permissions, incident timeline, and whether data or log growth is reported. This kit does not support Azure SQL Database, Synapse, or Fabric. Do not run these scripts against those products or improvise around a platform guard.
- Obtain an approved connection to
tempdb. Read scripts before execution. Use the existing SQL connection/tool or SSMS/sqlcmd; never invent credentials, targets, or results. All diagnostics are read-only, but may require elevated monitoring permissions and add some load. - Run space and IO first. Separate allocated file size, occupied categories, reusable extent space, and log occupancy. Free extents do not measure free disk capacity.
- Run consumers to identify session allocations, active requests, and blocking. Keep SQL text disabled unless explicitly approved for a private capture. Session and request results overlap; never add those result sets together.
- For log pressure, run log transactions. Examine reuse waits, transaction age, used/reserved log bytes, and owners. A sleeping session with an open transaction can matter; the biggest writer is not necessarily the oldest transaction preventing reuse.
- For version retention, run version stores. Distinguish traditional tempdb versions from ADR persistent versions. PVS in a user database is not tempdb occupancy; SQL Server 2025 can also enable ADR/PVS in tempdb. Long-lived snapshot transactions are candidates, not proven blockers of cleanup. Account for database visibility and readable-secondary retention.
- Repeat relevant scripts at a modest interval (for example 30-60 seconds) and compare timestamps, file sizes, allocations, progress, and IO counter deltas. Discard deltas across restarts or counter resets; session IDs can be reused. Stop on errors and report the failing script and permission/platform issue. Do not present partial or permission-limited results as a clean bill of health.
- Report observed data/log growth, dominant category, likely owners, progress or waits, measured evidence, remaining hypotheses, and a safe next action. Request approval before shrink, restart, kill, configuration changes, or workload replay. Recommend one evidence-supported change and verify it with comparable samples; successful space reuse does not require file shrink.
If no approved connection is available, provide the execution order and request redacted results rather than claiming a diagnosis. Do not save raw query text, production captures, or credentials in this public repository. Follow secret handling.
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.

