2.5 Discovering SQL Server Resources

Use the Discovery_SQLServer Knowledge Script to discover SQL Server configurations and resources. This script raises an event if discovery fails or succeeds.

By default, this script runs once for each computer.

NOTE:To run this Knowledge Script, you need public and read-only SQL Server permission.

To discover AlwaysOn availability group databases under SQL Server instance that is on the secondary replica, ensure that the Readable Secondary option is configured as Yes.

If you delete or add a resource object, or if you make any other kind of change that might affect the monitoring of your resources, run the Discovery_SQLServer Knowledge Script again to update your list of resource objects. In addition, if you are running this module on AppManager 8 or later, you can use the delta discovery feature in Control Center to run discovery on a schedule to more quickly detect changes to your environment.

When you run Discovery_SQLServer Knowledge Script, SQL Server Cluster Instances are discovered under SQL Server Virtual folder and SQL Server Instances (non-clustered) are discovered under NT machine folder. Therefore, you can monitor clustered instances only through the SQL Server Virtual folder.

Resource Object

NT machine

Setting Parameter Values

Set the Values tab parameters as needed:

Description

How to Set It

Job Failure Notification

 

Raise event if job fails unexpectedly

Select Yes to raise an event if discovery 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.

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 for SQL Server discovery. You can either select Windows Authentication or SQL Server Authentication. The default is Windows Authentication.

Username

Specify the Windows or SQL Server user name that you want to use for SQL Server discovery. If you are a Windows user, specify the user name in the DomainName\User format. You can specify multiple users separated by commas. This field is optional.

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

Exclude server list (comma-separated list)

Specify the list of SQL server instances that you do not want to discover, separated by commas.

Specify list of databases to exclude (comma-separated)

Specify the name of the databases you want to exclude from discovery, 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 discovery.

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

Exclude discovering availability group databases under SQL Server instance

Select Yes to exclude discovery of availability group databases under SQL Server instance.

NOTE:This parameter does not apply when you run this discovery job on a availability group listener node.

Exclude discovering the data and log space information for a database if auto growth is enabled?

Select Yes to exclude discovery of the data space and the log space information for a database if auto growth is enabled. The default is unselected.

Raise event if discovery succeeds?

Select Yes to raise an event if discovery succeeds. The default is Yes.

Event severity when discovery succeeds

Set the event severity level, from 1 to 40, to reflect the importance of an event in which discovery succeeds. The default is 25.

Event severity when discovery is not applicable

Set the event severity level, from 1 to 40, to reflect the importance of an event in which discovery is not applicable. The default is 15.

Raise event if discovery partially succeeds?

Select Yes to raise an event if discovery succeeds partially. The default is Yes.

NOTE:The event displays the list of databases that are not discovered.

Event severity when discovery partially succeeds

Set the event severity level, from 1 to 40, to reflect the importance of an event in which discovery partially succeeds. The default is 15.

Raise event if discovery fails?

Select Yes to raise an event if discovery fails. The default is Yes

Event severity when discovery fails

Set the event severity level, from 1 to 40, to reflect the importance of an event in which discovery fails. The default is 5.