Some checks are pending
CI / Build og unit tests (push) Waiting to run
CI / Integration (mcr.microsoft.com/mssql/server:2017-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2019-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2022-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2025-latest) (push) Blocked by required conditions
Rule packs (support dates and newest CU per release) are published in a signed feed and hot-loaded without a restart; the verified pack is reloaded at startup. New versions are announced (Notify) or downloaded and staged by the unprivileged agent (Automatic), and installed by a privileged apply-update task that re-verifies signature and hash in an admin-only folder, keeps appsettings/web.config, health-checks the services and rolls back on failure. Stable and preview channels, manifest expiry and rollback protection, https or folder/share feeds for offline sites. Vendor tool gains rulepack and publish; the Hub can serve the feed; the web UI gets a System page with update, rule pack, license and exactly what is sent to the Hub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E3EExwndy8Z22EK2Qpt6BK
83 lines
2.6 KiB
C#
83 lines
2.6 KiB
C#
using SQLInsight.Rules.Availability;
|
|
using SQLInsight.Rules.Concurrency;
|
|
using SQLInsight.Rules.Configuration;
|
|
using SQLInsight.Rules.Databases;
|
|
using SQLInsight.Rules.Engine;
|
|
using SQLInsight.Rules.Indexes;
|
|
using SQLInsight.Rules.Lifecycle;
|
|
using SQLInsight.Rules.Performance;
|
|
|
|
namespace SQLInsight.Rules;
|
|
|
|
public static class BuiltInRules
|
|
{
|
|
/// <param name="knowledge">The rule pack behind the version rules; the embedded one if null.</param>
|
|
public static IReadOnlyList<IRule> Create(RuleKnowledge? knowledge = null)
|
|
{
|
|
knowledge ??= RuleKnowledge.Embedded();
|
|
return
|
|
[
|
|
// Version
|
|
new SupportLifecycleRule(knowledge),
|
|
new PatchLevelRule(knowledge),
|
|
|
|
// Configuration
|
|
new MaxServerMemoryDefaultRule(),
|
|
new MaxServerMemoryTooHighRule(),
|
|
new CostThresholdRule(),
|
|
new MaxDopRule(),
|
|
new OptimizeForAdHocRule(),
|
|
.. SimpleConfigurationRules.Create(),
|
|
new PendingConfigurationRule(),
|
|
new DeadlockTraceFlagRule(),
|
|
|
|
// Databases
|
|
new DatabaseStateRule(),
|
|
.. SimpleDatabaseRules.Create(),
|
|
new CompatibilityLevelRule(),
|
|
new FullBackupRule(),
|
|
new LogBackupRule(),
|
|
new CheckDbRule(),
|
|
new SuspectPagesRule(),
|
|
new VirtualLogFileRule(),
|
|
new FileGrowthRule(),
|
|
new FileMaxSizeRule(),
|
|
new QueryStoreStateRule(),
|
|
new TempdbFilesRule(),
|
|
|
|
// Performance
|
|
.. WaitRules.Create(),
|
|
new DataFileReadLatencyRule(),
|
|
new LogFileWriteLatencyRule(),
|
|
new CpuRule(),
|
|
new MemoryGrantsPendingRule(),
|
|
new AnomalyRule(),
|
|
new PlanRegressionRule(),
|
|
new FailedForcedPlanRule(),
|
|
new ParameterSensitivityRule(),
|
|
new ImplicitConversionRule(),
|
|
new NoJoinPredicateRule(),
|
|
new ScalarUdfRule(),
|
|
new SpillRule(),
|
|
new ExcessiveGrantRule(),
|
|
|
|
// Indexes and statistics
|
|
new MissingIndexRule(),
|
|
new UnusedIndexRule(),
|
|
new DuplicateIndexRule(),
|
|
new ForwardedRecordsRule(),
|
|
new StaleStatisticsRule(),
|
|
new AutoStatisticsRule(),
|
|
|
|
// Availability and jobs
|
|
new AvailabilityGroupHealthRule(),
|
|
new AvailabilityGroupLagRule(),
|
|
new FailedJobRule(),
|
|
new AgentStoppedRule(),
|
|
|
|
// Concurrency
|
|
new BlockingRule(),
|
|
new DeadlockRule(),
|
|
];
|
|
}
|
|
}
|