このモニターは、Microsoft® SQL Server™ インスタンスのサービス プリンシパル名の構成の状態を確認します。
このモニターは、Microsoft® SQL Server™ インスタンスのサービス プリンシパル名の構成を確認します。これは、SQL Server サービスとドメイン コントローラーの構成を比較することで行われます。
SQL Server データベース エンジンのサービス プリンシパル名 (SPN) が見つからないか、間違っているか、ドメインの Active Directory で構成されている他の SPN と重複している可能性があります。
注: 間違っている SPN は、Active Directory の間違ったアカウントで構成された SPN です。
setspn.exe および klist.exe プログラムを使用して問題を解決できることがあります。
どちらのツールも Windows Server 2008 以降に付属しています。以前のバージョンの Windows では、Microsoft ダウンロード センターから別途ダウンロードするか、Windows サポート ツール パッケージから取得する必要があります。
ケース 1: 不足している SPN を解決する方法
1.次のコマンドを実行して不足している SPN を追加します。:
setspn –A <SPN> <Account>
2.クライアント アプリケーションを使用して SQL Server に再接続を試みます。
または、SQL サービス アカウントに適切なアクセス許可を与え、SQL が必要な SPN を自動的に生成できるようにします。
注: SPN が不足していても接続エラーが発生しないことがありますが、アプリケーションで Kerberos 認証を使用できなくなります。
ケース 2: 間違っている SPN を解決する方法
1.次のコマンドを実行して間違っている SPN を削除します。:
setspn –D <SPN> <Account>
2.クライアント コンピューターで、ログオフして再度ログインするか、次のコマンドを実行して、Kerberos チケットのキャッシュを消去します。:
klist による消去
3. クライアント アプリケーションを使用して SQL Serverに 再接続してください。
注: アプリケーションから Kerberos を使用するには、前のケース 1 の解決策を使用して正しい SPN を構成する必要があります。
ケース 3: 重複している SPN を解決する方法
1.重複していて削除する必要がある SPN を特定します。
2.次のコマンドを実行して、重複している各 SPN を削除します。:
setspn –D <SPN> <Account>
3. クライアント コンピューターで、いったんログオフしてからもう一度ログインするか、以下のコマンドを実行して、Kerberos チケットのキャッシュをクリアします。
klist による消去
4. クライアント アプリケーションを使用して SQL Server に再接続してください。
Target | Microsoft.SQLServer.2012.DBEngine | ||
Parent Monitor | System.Health.ConfigurationState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SQLServer.2012.DBEngine.Configuration.SPNStatus | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SQLServer.2012.DBEngine.Configuration.SPNStatusMonitor" Accessibility="Public" Enabled="true" Target="SQL2012Core!Microsoft.SQLServer.2012.DBEngine" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.DBEngine.Configuration.SPNStatus" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.DBEngine.Configuration.SPNStatusMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/Account$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='MissingSpnList']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='MisplacedSpnList']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='DuplicateSpnList']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Good" MonitorTypeStateID="Good" HealthState="Success"/>
<OperationalState ID="Bad" MonitorTypeStateID="Bad" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerNetworkName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerNetworkName>
<NetbiosComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</InstanceName>
<Account>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/Account$</Account>
<ServiceName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</ServiceName>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>300</TimeoutSeconds>
<SearchScope>LDAP</SearchScope>
</Configuration>
</UnitMonitor>