可信任組態

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

監視資料庫的可信任設定

Knowledge Base article:

摘要

此監視器會檢查此資料庫的 [可信任] 設定。由於此監視為整體標準需求的一部分,所以如果設定不符合指定的標準,便會產生警示。

組態

TRUSTWORTHY 設定是用來指出 SQL Server 執行個體是否信任資料庫及其中的內容。當 [可信任] 設定為 ON 時,使用模擬內容的資料庫模組 (例如使用者定義函數或預存程序) 可以存取資料庫外部的資源。

為了將安全性風險降至最低,TRUSTWORTHY 應設為 OFF。設為 OFF 時,“EXECUTE AS USER” 的範圍為資料庫本身,而且只能使用標示為 SAFE 的 CLR 組件。請只在您確定應用程式需要它時,才設為 ON。

TRUSTWORTHY {ON | OFF}

原因

如果選項不符合必要的設定,便會引發警告警示。根據預設,當此設定為 "ON" 時,監視器會設定為產生警示。

解決方式

請按照下列方式解決此問題:

或者,如果此監視與這個資料庫無關:

外部資源

如需有關這項設定的詳細資訊,請參閱:< ALTER DATABASE SET 選項 (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
可信任組態錯誤
電腦 "{0}" 上 SQL 執行個體 "{1}" 中資料庫 "{2}" 的可信任設定未依照最佳作法設定。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.Database.Configuration.TrustWorthy" 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.TrustWorthy.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>TrustWorthy</ConfigValue>
<ExpectedValue>OFF</ExpectedValue>
<ExcludeOnExpress>false</ExcludeOnExpress>
<SQLSKU>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/Edition$</SQLSKU>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>