3.3 AvailabilityGroupOwner

Use this Knowledge Script to determine the node ownership of SQL Server AlwaysOn Availability Group. This script raises an event if the availability group owner node is changed. The script generates data streams for ownership status.

Resource Object

Availability Groups

Default Schedule

The default interval for this script is Every 5 minutes.

Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

General Settings

Job Failure Notification

Raise event if job fails unexpectedly?

Select Yes to raise an event if the SQLServer_AvailabilityGroupOwner job fails unexpectedly. The default is Yes.

Event severity when job fails unexpectedly

Set the event severity level, from 1 to 40, to indicate the importance of an event that is raised when the job fails unexpectedly. The default is 5.

Raise event if SQL Server login fails?

Select Yes to raise an event if login to SQL server fails. The default is Yes.

Event severity when SQL Server login fails

Set the event severity level, from 1 to 40, to indicate the importance of an event that is raised when the login to SQL server fails. The default is 15.

Additional Settings

 

Event Details

 

Event detail format

Select the format in which you want to display the event detail. You can select from HTML Table or Plain Text. The default is HTML Table.

Authentication

Select the authentication method to access SQL Server. You can either select Windows Authentication or SQL Server Authentication. The default is Windows Authentication.

User name

Specify the Windows or SQL Server user name to access SQL Server. You can specify multiple users separated by a comma. The default is none.

For more information on specifying user name, see Section 2.7.3, Specifying the User Name in the Knowledge Script.

Monitor Failover Availability Group

Timeout

Specify the number of seconds that the Knowledge Script should wait to obtain the owner node state before raising a timeout exception. The default is 30 seconds.

Event Notification

Raise event if owner node is changed?

Select Yes to raise an event if the availability group owner is changed. The default is Yes.

Event severity when owner node is changed

Set the event severity level, from 1 to 40, to indicate the importance of an event that is raised when the availability group owner has changed. The default is 5.

Raise event to show the owner node in first iteration?

Select Yes to raise an event to display the availability group owner in the first iteration. The default is unselected.

Event severity to show the owner node in first iteration

Set the event severity level, from 1 to 40, to indicate the importance of an event to display the availability group owner in the first iteration. The default is 25.

Data Collection

Collect data for owner node state?

Select Yes to collect availability group owner node status data for charts and reports. The default is unselected.