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.
[Top]
Using PowerShell
To configure FailureConditionLevel settings
Start an elevated Windows PowerShell via Run as Administrator.
Import the FailoverClusters module to enable cluster cmdlets.
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.
Tip
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
Related Content (PowerShell)
Clustering and High-Availability (Failover Clustering and Network Load Balancing Team Blog)
Getting Started with Windows PowerShell on a Failover Cluster
Cluster resource commands and equivalent Windows PowerShell cmdlets
[Top]
Using the Failover Cluster Manager Snap-in
To configure FailureConditionLevel property settings:
Open the Failover Cluster Manager snap-in.
Expand the Services and Applications and select the FCI.
Right-click the SQL Server resource under Other Resources, and then select Properties from the menu. The SQL Server resource Properties dialog box opens.
Select the Properties tab, enter the desired value for the FaliureConditionLevel property, and then click OK to apply the change.
[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;
[Top]
See Also
Reference
sp_server_diagnostics (Transact-SQL)