Udostępnij za pośrednictwem


Configure FailureConditionLevel Property Settings

Use the FailureConditionLevel property to set the conditions for the AlwaysOn Failover Cluster Instance (FCI) to fail over or restart. Changes to this property are applied immediately without requiring a restart of the Windows Server Failover Cluster (WSFC) service or the FCI resource.

  • Before you begin:  FailureConditionLevel Property Settings, Security

  • To configure the FailureConditionLevel property settings using, PowerShell, Failover Cluster Manager, Transact-SQL

Before You Begin

FailureConditionLevel Property Settings

The failure conditions are set on an increasing scale. For levels 1-5, each level includes all the conditions from the previous levels in addition to its own conditions. This means that with each level, there is an increased probability of a failover or restart. For more information, see the "Determining Failures" section of the Failover Policy for Failover Cluster Instances topic.

Security

Permissions

Requires ALTER SETTINGS and VIEW SERVER STATE permissions.

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using PowerShell

To configure FailureConditionLevel settings

  1. Start an elevated Windows PowerShell via Run as Administrator.

  2. Import the FailoverClusters module to enable cluster cmdlets.

  3. Use the Get-ClusterResource cmdlet to find the SQL Server resource, then use Set-ClusterParameter cmdlet to set the FailureConditionLevel property for a Failover Cluster Instance.

PoradaPorada

Every time you open a new PowerShell window, you need to import the FailoverClusters module.

Example (PowerShell)

The following example changes the FailureConditionLevel setting on the SQL Server resource "SQL Server (INST1)" to fail over or restart on critical server errors.

Import-Module FailoverClusters

$fci = "SQL Server (INST1)"
Get-ClusterResource $fci | Set-ClusterParameter FailureConditionLevel 3

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using the Failover Cluster Manager Snap-in

To configure FailureConditionLevel property settings:

  1. Open the Failover Cluster Manager snap-in.

  2. Expand the Services and Applications and select the FCI.

  3. Right-click the SQL Server resource under Other Resources, and then select Properties from the menu. The SQL Server resource Properties dialog box opens.

  4. Select the Properties tab, enter the desired value for the FaliureConditionLevel property, and then click OK to apply the change.

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Using Transact-SQL

To configure FailureConditionLevel property settings:

Using the ALTER SERVER CONFIGURATION Transact-SQL statement, you can specify the FailureConditionLevel property value.

Example (Transact-SQL)

The following example sets the FailureConditionLevel property to 0, indicating that failover or restart will not be triggered automatically on any failure conditions.

ALTER SERVER CONFIGURATION SET FAILOVER CLUSTER PROPERTY FailureConditionLevel = 0;

Ikona strzałki używana z łączem Powrót na górę strony[Top]

Zobacz także

Odwołanie

sp_server_diagnostics (Transact-SQL)

Koncepcje

Failover Policy for Failover Cluster Instances