Skip to content

Commit cbe34c5

Browse files
Uwe Jankeclaude
andcommitted
Get-sqmDiskSpaceReport: snapshot-history growth forecast (method B1) (1.7.0.0)
Replaces the default-trace AutoGrow forecast (empty for pre-sized DBs and unreliable due to the short default-trace retention) with a self-collected snapshot history plus linear least-squares regression. - Each run appends per-volume usage to History\DiskHistory_<instance>.json and fits UsedGB over the last -HistoryDays days: GB/day, DaysUntilFull, and a confidence (R²/point count: Low/Medium/High). - Measures the actual consumption trend (incl. data growth inside pre-sized files) and is keyed by volume_mount_point (mount-point safe). - Below -MinDataPoints snapshots a volume is reported as "collecting (n of m)" instead of silent n/a. - New params -HistoryPath/-MinDataPoints/-NoHistory; new fields DataPoints/ForecastConfidence/ ForecastBasis; report columns GB/Tag, DaysFull, Konf. -WhatIf does not persist history. - Verified against a local SQL 2022: cold start collects, seeded history yields ~2 GB/day / correct DaysUntilFull / High confidence. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9e257df commit cbe34c5

3 files changed

Lines changed: 244 additions & 78 deletions

File tree

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# sqmSQLTool — Changelog
22

3+
## [1.7.0.0] — 2026-06-22
4+
5+
### ✨ Neu
6+
7+
- **Get-sqmDiskSpaceReport — Wachstumsprognose neu auf Snapshot-Historie (Methode B1)**:
8+
Die Prognose basierte bisher ausschließlich auf AutoGrow-Events des Default Trace und blieb
9+
damit leer, sobald keine automatischen Dateivergrößerungen im Zeitfenster lagen (gut dimensionierte
10+
DBs) oder die kurze Default-Trace-Retention die Events verdrängt hatte. Stattdessen wird jetzt bei
11+
jedem Lauf die Volume-Belegung in eine JSON-Historie (`History\DiskHistory_<Instanz>.json`)
12+
geschrieben und über die letzten `-HistoryDays` Tage per **linearer Regression (Least Squares)**
13+
ausgewertet: `GB/Tag`, `DaysUntilFull` und eine Konfidenz (R²/Punktzahl: Low/Medium/High).
14+
- Misst den **tatsächlichen Verbrauchstrend** (auch Datenwachstum in vorab dimensionierten Dateien)
15+
und ist **mountpoint-sicher** (Auswertung je `volume_mount_point`).
16+
- Vor `-MinDataPoints` Läufen (Default 5) wird das Volume transparent als „Prognose sammelt noch
17+
Daten (n von m)" ausgewiesen statt still `n/a`.
18+
- Neue Parameter: `-HistoryPath`, `-MinDataPoints`, `-NoHistory`. Neue Ausgabefelder:
19+
`DataPoints`, `ForecastConfidence`, `ForecastBasis`. Report-Spalten: `GB/Tag`, `DaysFull`, `Konf`.
20+
- `-WhatIf` persistiert die Historie nicht.
21+
- Hinweis: Für belastbare Prognosen die Funktion regelmäßig planen (z. B. täglicher Agent-Job).
22+
323
## [1.6.4.0] — 2026-06-22
424

525
### 🔧 Fixes — ungültige DMV-Spalten (gefunden per Live-Lauf + statischer DMV-Validierung gegen SQL 2022)

0 commit comments

Comments
 (0)