Commit 247a446
Fix SQL dumps on mirroring passive servers from FinOps collectors (#535)
The database_size_stats and server_properties collectors iterate
databases with cursor-based dynamic SQL. On mirroring passive servers,
RESTORING databases must be excluded to prevent severity 22 engine
crashes (same root cause as #384 and #430).
- database_size_stats: Change state_desc filter to d.state = 0
- server_properties: Change state_desc filter to d.state = 0,
add HAS_DBACCESS() check (was missing entirely)
Fixes #535
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent bbe1c63 commit 247a446
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
0 commit comments