tempdb-growth
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.
- License 许可
- MIT
- 所属仓库
- microsoft/bobsql
- 最近更新
- 2026-11-11
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- tempdb-growth
- description
- 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.
03 SKILL.md 正文
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.
04 同仓库更多 Skills
sql-versioning-apps
Launch, run, review, rehearse, test, or update the local SQL versioning click-through apps in examples/sqlversioning/apps. Use when the user says run the app, start the app, open the app, demo apps, browser demos, SQL versioning visuals, or asks about the Cowboys-themed demo pages. In this repository, running the app means opening a NEW normal external browser window, not the VS Code integrated browser.
shift-handoff
Find the patients who most need a shift handoff, and prepare a structured SBAR handoff for one named patient — grounded entirely in that patient's live chart — for the clinician to review and save.
nvidianim
NVIDIA NIM on AKS with GPU — vector embeddings and chat completions from SQL Server 2025 T-SQL using GPU-accelerated inference. Use when: deploying NIM containers on AKS, creating AKS GPU node pools, testing NIM endpoints, creating external models for NIM embeddings, Azure Local edge AI pattern, working in nvidianim/.
zavahospital
ZavaHospital – AI-powered inpatient clinical assistant using SQL Server 2025 vector search + NVIDIA NIM on AKS. Use when: deploying zavahospital scripts, building encounter embeddings, running vector search procs, generating clinical recommendations via NIM chat, creating doctor notes search, working in zavahealth/sqlserver2025/zavahospital/.
wardgeneral
Guide the cumulative Ward General Hospital Azure SQL Hyperscale demo: provision/schema, architecture, .NET 10 Blazor app, SQL AI, agentic shift handoff, security/RLS, observability, failover/PITR/geo, scaling, and tuning. Use for examples/wardgeneral.
waits-latches-spinlocks
Investigate SQL Server waits, scheduler yield, buffer latches, LOCK_HASH spinlocks, and Azure SQL log governance. Use when working with examples/insidewaitslatchesspinlocks and its debugwaits, latches, spinlocks, or loggovernance areas.