Run health checks across multiple SQL servers simultaneously using parallel processing.
Features:
- Issue queries to all servers concurrently with
Task.WhenAll() - Results grouped by check showing passed/failed per server
- Expandable per-server view
- Connection throttling prevents overload
Usage:
var servers = new List<ServerConnection>
{
new ServerConnection { ServerName = "Server1", ConnectionString = conn1 },
new ServerConnection { ServerName = "Server2", ConnectionString = conn2 },
new ServerConnection { ServerName = "Server3", ConnectionString = conn3 }
};
var results = await CheckRunner.RunChecksOnMultipleServersAsync(
servers,
checks,
progress: new Progress<(string server, int current, int total)>(p =>
{
Console.WriteLine($"[{p.server}] {p.current}/{p.total}");
}));
// Results grouped by check
foreach (var checkGroup in results.GroupedByCheck)
{
Console.WriteLine($"{checkGroup.CheckName}: {checkGroup.PassedCount} passed, {checkGroup.FailedCount} failed");
foreach (var serverResult in checkGroup.ServerResults)
{
Console.WriteLine($" - {serverResult.ServerName}: {(serverResult.Passed ? "PASS" : "FAIL")}");
}
}Secure connection management with Windows and SQL Server authentication options.
Features:
- Windows Authentication (Recommended) - Uses AD credentials
- SQL Server Authentication - For non-AD environments
- Encryption settings (Encrypt, TrustServerCertificate)
- Connection test before use
- Security validation with warnings
Security Best Practices:
- Windows Auth preferred (Integrated Security=SSPI)
- Password not stored - re-entered each session
- Security warnings for insecure settings
- Connection string sanitization for logging
Enterprise patterns for building secure connection strings.
Usage:
// Windows Authentication (recommended)
var connStr = ConnectionStringBuilder.BuildWithIntegratedSecurity(
server: "SERVER01",
database: "master",
encrypt: true,
trustServerCertificate: false);
// SQL Server Authentication
var connStr = ConnectionStringBuilder.BuildWithSqlAuth(
server: "SERVER01",
username: "admin",
password: GetPasswordFromSecureStorage(), // Never hardcode!
database: "master");
// Parse existing connection string
var info = ConnectionStringBuilder.ParseConnectionString(existingConnStr);
Console.WriteLine($"Server: {info.Server}");
Console.WriteLine($"Uses Windows Auth: {info.UseIntegratedSecurity}");
// Validate security
var validation = ConnectionStringBuilder.ValidateSecurity(connStr);
if (!validation.IsSecure)
{
foreach (var warning in validation.Warnings)
{
Console.WriteLine($"β οΈ {warning}");
}
}
// Safe for logging (masks password)
var sanitized = ConnectionStringBuilder.GetSanitizedForLogging(connStr);Configure and manage embedded diagnostic scripts.
Features:
- Scan scripts folder to auto-detect SQL files
- Configure execution parameters
- Set execution order
- Enable/disable scripts
- Configure timeout and CSV export
- Default parameters for sp_Blitz, sp_BlitzIndex, sp_BlitzFirst
Setup:
- Create
scriptsfolder in app directory - Copy diagnostic scripts (sp_Blitz.sql, sp_triage.sql)
- Click "Scan Scripts Folder"
- Configure parameters
- Save configuration
Execute all configured scripts and export results to CSV.
Features:
- Runs all enabled scripts in order
- Exports each result set to CSV
- Server name and timestamp in filenames
- Error handling per script
- Progress reporting
Output Files:
output/
βββ SERVER01_sp_Blitz_20260123-143022.csv
βββ SERVER01_sp_BlitzIndex_20260123-143045.csv
βββ SERVER01_sp_triage_20260123-143112.csv
βββ (any errors logged to _ERROR_ files)
Edit multiple checks simultaneously.
Features:
- Select multiple checks (Ctrl+Click)
- Change Category, Severity, Priority
- Change Enabled state
- Change Execution Type
- Apply to all selected
Background monitoring for memory pressure.
Features:
- Timer checks every 5 minutes
- Triggers cleanup on high pressure
- Server GC configuration
- Proper disposal on window close
Visual progress for long operations.
Features:
- Status text
- Progress bar
- Percentage display
- Thread-safe updates
Added CommunityToolkit.Mvvm for enterprise patterns:
<!-- In .csproj -->
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.*" />Can now use:
- ObservableProperty attributes
- RelayCommand/AsyncRelayCommand
- ObservableObject base class
- Messenger for loose coupling
Multi-server operations use Task.WhenAll for maximum throughput:
var serverTasks = servers.Select(async server =>
{
using var runner = new CheckRunner(server.ConnectionString);
return await runner.RunChecksAsync(checks);
});
var allResults = await Task.WhenAll(serverTasks);Enterprise disposal patterns:
// All runners implement IDisposable
using var runner = new CheckRunner(connectionString);
var results = await runner.RunChecksAsync(checks);
// Automatically disposed
// Background cleanup
ResourceManager.SuggestCleanup();
ResourceManager.AggressiveCleanup();
// Memory monitoring
var pressure = ResourceManager.CheckMemoryPressure();
if (pressure == MemoryPressure.High)
{
ResourceManager.AggressiveCleanup();
}Added to project files:
<PropertyGroup>
<ServerGarbageCollection>true</ServerGarbageCollection>
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
</PropertyGroup>ConnectionStringBuilder.cs- Enterprise connection patternsCompleteHealthCheckRunner.cs- Script execution + CSV export
ConnectionDialog.xaml/.cs- Connection configurationBulkEditDialog.xaml/.cs- Bulk edit checksScriptManagerWindow.xaml/.cs- Script managementProgressWindow.xaml/.cs- Progress display
β
Windows Authentication preferred - Uses AD credentials
β
Passwords not stored - Re-entered each session
β
Connection string sanitization - Safe for logging
β
Security validation - Warns about insecure settings
β
Encryption support - Encrypt=True recommended
β
Certificate validation - TrustServerCertificate guidance
β
Connection throttling - Prevents connection exhaustion
MultiServerCheckResults
βββ ServerResults[]
β βββ ServerName
β βββ ConnectionSuccessful
β βββ Results[]
β β βββ CheckId
β β βββ Passed
β β βββ Message
β βββ ErrorMessage (if failed)
βββ GroupedByCheck[]
βββ CheckId
βββ CheckName
βββ PassedCount
βββ FailedCount
βββ ServerResults[]
βββ ServerName
βββ Passed
βββ Message
- Click "Connect" button
- Select Windows or SQL Auth
- Enter server name
- Test connection
- Click "Run Checks"
- Add servers to list
- Configure auth per server
- Click "Run All"
- View grouped results
- Expand per-server details
- Configure scripts in Script Manager
- Click "Full Check" button
- Confirm execution
- Wait for progress
- Review CSV files
- Open Check Manager
- Select multiple checks
- Click "Bulk Edit"
- Select properties to change
- Apply and save
- Use Windows Auth - Most secure, uses AD credentials
- Test connections - Always test before running checks
- Review security warnings - Don't ignore encryption warnings
- Monitor memory - Check stats in production
- Use batch operations - Bulk edit saves time
- Export to CSV - Full Check creates detailed reports
β
Multi-server support - Parallel execution across servers
β
Enterprise security - Windows Auth, secure connections
β
Connection builder - Enterprise patterns for connection strings
β
Script manager - Configure diagnostic scripts
β
Bulk editing - Edit multiple checks at once
β
Memory monitoring - Background pressure checks
β
MVVM toolkit - Enterprise architecture support
β
Progress tracking - Visual feedback for operations
All code is implemented and ready for enterprise deployment!