sqlinsight-pro/tests/SQLInsight.Collectors.Tests
Søren Eggert Lundsteen Olsen 2284e7f082 SQL Scripts: one reviewable script per rule
A DBA should be able to review every statement SQLInsight sends to a
monitored server before granting it access. "SQL Scripts/<rule-id>.sql"
holds, per rule (82 built-in, 16 community), a Danish header (what and
why, how C# judges the data, thresholds with config keys, severity,
exact GRANTs, versions, collector file and member) and the collector's
SQL verbatim, every version variant as its own batch.
"_collectors/<Collector>.sql" holds each collector's queries once.

The only statement that is not strictly read-only is documented in the
scripts: the deadlock collector's session temp table (#system_health).

Inline SQL in the collectors moved to internal constants and Build*Sql
methods (no text changed), so SqlScriptTests can check that the scripts
still contain the SQL the code sends, that every rule has a script, that
every collector query is registered, and that nothing writes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 13:20:06 +02:00
..
SqlScripts SQL Scripts: one reviewable script per rule 2026-10-02 13:20:06 +02:00
DeadlockParserTests.cs Stop SQLInsight deadlocking itself, and stop reporting its own deadlocks 2026-10-02 07:34:59 +02:00
ShowplanAnalyzerTests.cs Fase 2: plan cache analysis 2026-09-29 07:40:09 +00:00
Sql2005CompatibilityTests.cs SQL Server 2005: fix agent jobs and plan analysis, guard against 2008+ syntax 2026-10-01 15:51:39 +02:00
SQLInsight.Collectors.Tests.csproj SQL Scripts: one reviewable script per rule 2026-10-02 13:20:06 +02:00
SqlSelectionTests.cs Fase 2: Always On availability groups and SQL Agent jobs 2026-09-29 07:53:49 +00:00