3.1 Accessibility

Use this Knowledge Script to monitor SQL Server database accessibility. This script raises an event if a specified database is not accessible. In addition, this script generates data streams for database accessibility.

You can set a timeout to determine how many times the Knowledge Script attempts to connect to a database.

NOTE:To run this Knowledge Script, you need public and read-only permission on all the databases that are to be monitored.

You can monitor availability group databases on secondary replica only if the Readable Secondary option is configured as Yes for secondary replica.

Resource Object

SQL Server instance

AlwaysOn availability group listener

Default Schedule

The default interval for this script is Once every hour.

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_Accessibility 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 sever 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 that you want to use 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 that you want to use 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 Specifying the User Name in the Knowledge Script in the Management Guide.

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

Monitor Server Accessibility

Timeout

Specify the number of seconds to wait for a response before retrying or determining the database is inaccessible. The default is 30 seconds.

When specifying a timeout, the Knowledge Script continues to wait until it receives a response or the timeout is reached. Limit your use of this parameter or keep the timeout period to a minimum for regular monitoring jobs.

When running this script to troubleshoot a particular problem and not on a regularly scheduled interval, adjust this parameter to allow a longer timeout period.

Number of retries

Specify the number of times this script should retry connecting to the database before determining the database is inaccessible. The default is 0 (no retry attempts).

This Knowledge Script continues waiting until it receives a response or has made the specified number of retry attempts. Limit your use of this parameter or keep retry attempts to a minimum for regular monitoring jobs.

When you are running this script to troubleshoot a particular problem and not on a regularly scheduled interval, you might want to adjust this parameter to allow more retry attempts.

Specify list of databases to exclude (comma-separated)

Specify the name of the databases you want to exclude from monitoring, separated by commas.

You can use standard pattern-matching characters when specifying database names:

  • * matches zero or more instances of a previous character

  • ? matches exactly one instance of a previous character

  • \d matches any single digit from 0 - 9

  • [ ] matches exactly one instance of any character between the brackets, including ranges

Specify file path containing list of databases to exclude

Specify the full file path of .csv or .txt format file that contains the name of the databases that you want to exclude from monitoring.

NOTE: Enter each database on a separate line.

You can use standard pattern-matching characters when specifying database names:

  • * matches zero or more instances of a previous character

  • ? matches exactly one instance of a previous character

  • \d matches any single digit from 0 - 9

  • [ ] matches exactly one instance of any character between the brackets, including ranges

Include detail report in data points

Select Yes to include a detail report in the data points collected for charts and reports. The default is unselected.

Exclude monitoring availability group databases under SQL Server instance?

Select Yes to exclude the monitoring of the availability group databases that are under the SQL Server instance. The default is unselected.

Exclude monitoring loading or restoring databases under SQL Server instance?

Select Yes to exclude the monitoring of the SQL Server databases that are in loading or restoring state under the SQL Server instance. The default is unselected.

Event Notification

Raise event if database accessibility is below threshold?

Select Yes to raise an event if database accessibility is below the threshold you specify. The default is Yes.

Event severity when database accessibility is below threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the database is not accessible. The default is 5.

Threshold - Minimum accessibility

Specify the minimum percentage of database accessibility that should be reached before generating an event. The default is 100 percent.

If the percentage of accessibility request falls below the threshold, AppManager raises an event.

Data Collection

 

Collect data for database accessibility?

Select Yes to collect data for charts and reports. If enabled, data collection returns the following:

  • 100--all specified databases are accessible

  • 50--some of the specified databases are accessible and some are not

  • 0--none of the specified databases is accessible.

The default is unselected.

Custom data stream legend

Specify a custom data stream legend to append with the default data legend for the job that is visible in the console. You can specify a maximum of 128 alphanumeric characters in a string, including special characters. The default is none.

Collect data for each database accessibility?

Select Yes to collect data for each database for charts and reports. If enabled, data collection returns the data for each database. The default is unselected.

Custom data stream legend

Specify a custom data stream legend to append with the default data legend for the job that is visible in the console. You can specify a maximum of 128 alphanumeric characters in a string, including special characters. The default is none.