SQL Server 連接埠監視

Microsoft.SystemCenter2012.ConfigurationManager.SQLPort (UnitMonitor)

此監視會檢查 SQL Server 連接埠是否正確。

Knowledge Base article:

摘要

這是定義明確的連接埠,用於大部分 Configuration Manager 站台系統角色和提供者與 SQL Server 之間的通訊 (預設連接埠 1433;可自訂)。 此外,這也是用來讓站台系統資料庫伺服器透過 SQL Server Service Broker 彼此通訊 (預設連接埠 4022;可自訂) 的明確定義連接埠。 SQL Server 通訊連接埠 (預設值 1433) 是利用 SQL Server Configuration Manager 來進行維護;SQL Server Configuration Manager 可設定用於 TCP/IP 通訊協定的 SQL Server 網路設定。 SQL Server Service Broker 連接埠 (預設值 4022) 是在 Configuration Manager 的安裝程序中進行設定。 第一次安裝 SQL Server 時,負責執行安裝的 SQL Server 資料庫系統管理員會建立用於 Configuration Manager 的特定資料庫執行個體,而且必須選擇該資料庫執行個體用來通訊的連接埠。

在用於要安裝之站台的 SQL Server 電腦上,安裝站台伺服器的 Configuration Manager 系統管理員必須擁有本機系統管理權限。 這可讓安裝程式自動取得用來設定從具名執行個體安裝的正確連接埠 (預設值 1433),並設定 SQL Server Service Broker 的正確連接埠 (預設值 4022)。

原因

網路上的防火牆規則禁止使用設定的連接埠進行通訊。

解決方式

當 Configuration Manager 偵測到無法連線到設定的 SQL Server 連接埠 (預設值 1433) 時,它會嘗試連線到包含其資料庫之 SQL Server 電腦上的登錄,然後變更 Configuration Manager 設定,以鏡像 SQL Server 上新設定的連接埠。 當 Configuration Manager 偵測到無法連線到設定的 SQL Server Service Broker 連接埠 (預設值 4022) 時,它會嘗試連線到包含其資料庫的 SQL Server 電腦,並將 SQL Server Service Broker 連接埠改回其原始設定。 不過,如果 Configuration Manager 站台伺服器無法連線至 SQL Server 系統,網路系統管理員必須檢查是否發生防火牆連接埠或網路連線問題。 請查看 [Configuration Manager 安裝資料夾]\Logs 中的 hman.log,以取得更多資訊。

Element properties:

TargetMicrosoft.SystemCenter2012.ConfigurationManager.SiteServer
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter2012.ConfigurationManager.StatusMessage3StateMonitor
RemotableTrue
AccessibilityPublic
Alert Message
SQL Server 連接埠不正確
站台伺服器 {0} 上的 SQL Server 連接埠設定不正確。
RunAsDefault
CommentSIV:GEN0203

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter2012.ConfigurationManager.SQLPort" Comment="SIV:GEN0203" Accessibility="Public" Enabled="onEssentialMonitoring" Target="SCCM!Microsoft.SystemCenter2012.ConfigurationManager.SiteServer" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter2012.ConfigurationManager.StatusMessage3StateMonitor" ConfirmDelivery="true">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter2012.ConfigurationManager.SQLPort_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SCCM!Microsoft.SystemCenter2012.ConfigurationManager.Server"]/SiteCode$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UIGeneratedOpStateId093d4f68de054ab0859735e23534486c" MonitorTypeStateID="Good" HealthState="Success"/>
<OperationalState ID="UIGeneratedOpStateIda22bfe352ed3451faf7bbc4bd0759f80" MonitorTypeStateID="Warning" HealthState="Warning"/>
<OperationalState ID="UIGeneratedOpStateIdb5ba7ce5ed71472da07bf84000128843" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<ComponentName>SMS_HIERARCHY_MANAGER</ComponentName>
<RuleId>B1B669B9-6C11-4b8e-A09A-4E515D20F4F6</RuleId>
<IntervalSeconds>360</IntervalSeconds>
</Configuration>
</UnitMonitor>