DB Chaining Configuration

Microsoft.SQLServer.2012.Database.Configuration.DBChaining (UnitMonitor)

Monitors the DB chaining setting for the database

Knowledge Base article:

概要

This monitor checks the DB Chaining setting for this database.Since this monitor is a part of an overall standards requirement, an alert would be generated if the setting does not meet the specified standard.

構成

The DB Chaining setting controls whether the database can be accessed by external resources, such as objects from another database.When the DB Chaining setting is ON, a database can be the source or target of a cross-database ownership chain.

To minimize the security surface area and to prevent certain spoofing scenarios, DB_CHAINING should be OFF.You should only have it ON if you are sure that your application requires it.

DB_CHAINING {ON | OFF}

原因

A warning alert will be raised if the option does not match the required setting.Out of the box, the monitor is configured to alert when this setting is set to “ON”.

解決方法

This issue may be resolved by:

Alternatively, if this monitor is not of concern for this database:

外部資料

See more detailed information about this setting: ALTER DATABASE SET Options (Transact-SQL)

Element properties:

TargetMicrosoft.SQLServer.2012.Database
Parent MonitorMicrosoft.SQLServer.2012.Database.ExternalAccessConfiguration
CategoryConfigurationHealth
EnabledFalse
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2012.DBConfigurationStatus
RemotableTrue
AccessibilityPublic
Alert Message
DB Chaining Configuration Error
The DB chaining setting for database "{0}" in SQL instance "{1}" on computer "{2}" is not set according to best practice.
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.Database.Configuration.DBChaining" Accessibility="Public" Enabled="false" Target="SQL2012Core!Microsoft.SQLServer.2012.Database" ParentMonitorID="Microsoft.SQLServer.2012.Database.ExternalAccessConfiguration" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.DBConfigurationStatus" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.Database.Configuration.DBChaining.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter2>
<AlertParameter3>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ConfigurationValueOK" MonitorTypeStateID="ConfigurationValueOK" HealthState="Success"/>
<OperationalState ID="ConfigurationValueNotOK" MonitorTypeStateID="ConfigurationValueNotOK" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ConnectionString>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ConnectionString$</ConnectionString>
<DatabaseName>$Target/Property[Type="SQL!Microsoft.SQLServer.Database"]/DatabaseName$</DatabaseName>
<IntervalSeconds>43200</IntervalSeconds>
<SyncTime/>
<ConfigValue>DBChaining</ConfigValue>
<ExpectedValue>OFF</ExpectedValue>
<ExcludeOnExpress>false</ExcludeOnExpress>
<SQLSKU>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/Edition$</SQLSKU>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>