App Manager For Microsoft SQ L Server
App Manager For Microsoft SQ L Server
App Manager For Microsoft SQ L Server
SQL Server
Management Guide
March 2020
Legal Notice
For information about NetIQ legal notices, disclaimers, warranties, export and other use restrictions, U.S. Government
restricted rights, patent policy, and FIPS compliance, see https://www.netiq.com/company/legal/.
For information about NetIQ trademarks, see https://www.netiq.com/company/legal/. All third-party trademarks are the
property of their respective owners.
Contents
Contents 3
4.2 Determining the non-default port for SQL Server or Availability Group Listener . . . . . . . . . . . . . . . . 84
4
About this Book and the Library
AppManager provides system administrators with a central, easy-to-use console to view critical
server and application resources across the enterprise. With AppManager, administrative staff can
monitor computer and application resources, check for potential problems, initiate responsive actions,
automate routine tasks, and gather performance data for real-time and historical reporting and
analysis.
Intended Audience
This guide provides information for individuals responsible for installing an AppManager module and
monitoring specific applications with AppManager.
Management guides
Provide information about installing and monitoring specific applications with AppManager.
Help
Provides context-sensitive information and step-by-step guidance for common tasks, as well as
definitions for each field on each window.
The AppManager library is available in Adobe Acrobat (PDF) format from the AppManager
Documentation page of the NetIQ website.
We are a global, enterprise software company, with a focus on the three persistent challenges in your
environment: Change, complexity and risk—and how we can help you control them.
Our Viewpoint
Adapting to change and managing complexity and risk are nothing new
In fact, of all the challenges you face, these are perhaps the most prominent variables that deny
you the control you need to securely measure, monitor, and manage your physical, virtual, and
cloud computing environments.
Our Philosophy
Selling intelligent solutions, not just software
In order to provide reliable control, we first make sure we understand the real-world scenarios in
which IT organizations like yours operate — day in and day out. That's the only way we can
develop practical, intelligent IT solutions that successfully yield proven, measurable results. And
that's so much more rewarding than simply selling software.
Our Solutions
Identity & Access Governance
Access Management
Security Management
Systems & Application Management
Workload Management
Service Management
Worldwide: www.netiq.com/about_netiq/officelocations.asp
Email: info@netiq.com
Worldwide: www.netiq.com/support/contactinfo.asp
Email: support@netiq.com
SQL Server
AppManager for Microsoft SQL Server provides a comprehensive solution for monitoring the
performance and availability of your SQL Server environment.
Quickly identify fault lines or factors that might adversely impact performance and take
preventive action
Plan and schedule timely upgrades
Isolate the causes of server performance problems and address them on time, ensuring better
performance for your enterprise
Run Knowledge Script jobs on SQL Server components
Run Knowledge Script jobs directly on SQL Server virtual servers in a clustered environment
AppManager for Microsoft SQL Server provides Knowledge Scripts designed to give you a
comprehensive view of how SQL Server performs on your servers. The Knowledge Scripts in the
SQL Server category monitor the following:
You can set thresholds that specify the boundaries of optimal performance. You can also configure
AppManager to raise events when those thresholds are crossed.
Server
This chapter provides installation instructions and describes system requirements for AppManager for
Microsoft SQL Server.
This chapter assumes you have AppManager installed. For more information about installing
AppManager or about AppManager system requirements, see the Installation Guide for AppManager,
which is available on the AppManager Documentation page.
NOTE
AppManager for Microsoft SQL Server 8.x cannot be upgraded from AppManager for Microsoft
SQL Server module 7.x.
This module has a new set of Knowledge Scripts and managed objects. It has a new approach to
monitor SQL Server than earlier versions (7.x) of the SQL module.
AppManager for Microsoft SQL Server has the following system requirements:
Software/Hardware Version
NetIQ AppManager installed on the 8.0.3, 8.2, 9.1, 9.2, 9.5, or later
AppManager repository (QDB) computers, on
the SQL Server computers you want to One of the following AppManager agents are required:
monitor (agents), and on all console
computers
AppManager agent 7.0.4 with hotfix 72616 or later
AppManager agent 8.0.3, 8.2, 9.1, 9.2, 9.5 or later
Microsoft Windows operating system on the One of the following:
agent computers
Windows Server 2019
Windows Server 2016
Windows Server 2012 R2
Windows Server 2012
Windows Server 2008 R2
Windows Server 2008 (32-bit or 64-bit)
(for TLS 1.2 support) NOTE: The SQL Server Native client can be installed from this
Microsoft download link.
NOTE: If you want TLS 1.2 support and are running AppManager 9.1 or 9.2, then you are required to
perform some additional steps. To know about the steps, see the article.
NOTE
Install Microsoft .NET Framework 3.5 and .NET Framework 4.0 or later on the agent computer
where you want to install the managed objects of AppManager for Microsoft SQL Server. To
install .NET 4.0 with the Add Roles and Features wizard in Windows Server Manager, refer the
Microsoft article.
Install Microsoft .NET Framework 3.5 on the computer where you want to install the repository,
Knowledge Scripts, help files and console extensions of AppManager for Microsoft SQL Server.
For Windows environments where User Account Control (UAC) is enabled, install the module using
an account with administrative privileges. Use one of the following methods:
Log in to the server using the account named Administrator. Then run the module installer .msi
file from a command prompt or by double-clicking it.
Log in to the server as a user with administrative privileges and run the module installer .msi file
as an administrator from a command prompt. To open a command-prompt window at the
administrative level, right-click a command-prompt icon or a Windows menu item and select Run
as administrator.
You can install the Knowledge Scripts and the Analysis Center reports into local or remote
AppManager repositories (QDBs). The module installer installs Knowledge Scripts for each module
directly into the QDB instead of installing the scripts in the \AppManager\qdb\kp folder as in previous
releases of AppManager.
You can install the module manually, or you can use Control Center to deploy the module on a remote
computer where an agent is installed. For more information, see Section 2.3, “Deploying the Module
with Control Center,” on page 14. However, if you do use Control Center to deploy the module,
Control Center only installs the agent components of the module. The module installer installs the
QDB and console components as well as the agent components on the agent computer.
NOTE: Microsoft .NET Framework 3.5 is required on the computer where you run the
installation program for the QDB portion of the module. For computers running more recent
versions of Windows operating systems that use a newer version of .NET, install .NET 3.5
with the Add Roles and Features wizard in Windows Server Manager, as described in this
Microsoft article.
5 (Conditional) If you use Control Center 7.x, run the module installer for each QDB attached to
Control Center.
After the installation has completed, the SQLserver_Install.log file, located in the
\NetIQ\Temp\NetIQ_Debug\ServerName folder, lists any problems that occurred.
1 Log on to Control Center using an account that is a member of a user group with deployment
permissions.
2 Navigate to the Deployment tab (for AppManager 8.x or later) or Administration tab (for
AppManager 7.x).
3 In the Deployment folder, select Packages.
4 On the Tasks pane, click Check in Deployment Packages (for AppManager 8.x or later) or Check
in Packages (for AppManager 7.x).
NOTE: To perform a silent install on an AppManager agent running Windows 2008 R2, open a
command prompt at the administrative level and select Run as administrator before you run the
silent install command listed above.
To silently install the module on a local machine (on an Agent) and to check in the Knowledge Scripts
on a remote AppManager repository, you can use either Windows authentication or SQL
authentication.
Windows authentication:
SQL authentication:
To create a log file that describes the operations of the module installer, add the following flag to the
command above:
/L* "AM70-SQLServer-8.x.x.0.msi.log"
The log file is created in the folder in which you saved the module installer.
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.
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
Raise event if job fails Select Yes to raise an event if discovery job fails unexpectedly. The default is
unexpectedly Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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,” on page 21.
Exclude server list (comma- Specify the list of SQL server instances that you do not want to discover,
separated list) separated by commas.
Specify list of databases to Specify the name of the databases you want to exclude from discovery,
exclude (comma- separated by commas.
separated)
You can use standard pattern-matching characters when specifying database
names:
Specify file path containing Specify the full file path of .csv or .txt format file that contains the name of the
list of databases to exclude databases that you want to exclude from discovery.
Exclude discovering Select Yes to exclude discovery of availability group databases under SQL
availability group databases Server instance.
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 Select Yes to exclude discovery of the data space and the log space information
data and log space for a database if auto growth is enabled. The default is unselected.
information for a database if
auto growth is enabled?
Raise event if discovery Select Yes to raise an event if discovery succeeds. The default is Yes.
succeeds?
Event severity when Set the event severity level, from 1 to 40, to reflect the importance of an event in
discovery succeeds which discovery succeeds. The default is 25.
Event severity when Set the event severity level, from 1 to 40, to reflect the importance of an event in
discovery is not applicable which discovery is not applicable. The default is 15.
Raise event if discovery Select Yes to raise an event if discovery succeeds partially. The default is Yes.
partially succeeds?
NOTE: The event displays the list of databases that are not discovered.
Event severity when Set the event severity level, from 1 to 40, to reflect the importance of an event in
discovery partially succeeds which discovery partially succeeds. The default is 15.
Raise event if discovery Select Yes to raise an event if discovery fails. The default is Yes
fails?
Event severity when Set the event severity level, from 1 to 40, to reflect the importance of an event in
discovery fails which discovery fails. The default is 5.
NOTE: The Discovery_SQLServerAlwaysOnCluster Knowledge Script does not discover and monitor
cluster shared disks through listener node.
You can discover AlwaysOn Availability Groups only on AppManager version 8.0.x or later.
In AppManager 8.0.2, NetIQ recommends that you use the Control Center Console to view the
objects under the availability group.
Security Rights
To correctly discover and monitor a Microsoft AlwaysOn cluster, this Knowledge Script requires local
Administrator access to each node of the Microsoft cluster. To do this, run the netiq service as a
domain user account and a member of the local Administrator group on each member of the cluster.
Without this access, the discovery fails because it relies on the Microsoft Cluster API to properly
access cluster resources.
Administering a Cluster
The Cluster Administrator can be used to administer a cluster, provided the account you are using
has the required permissions and group memberships. The local Administrator account and local
system account always have access to the cluster. You can use another account to administer a
cluster with Cluster Administrator if the following requirements are true:
The account has permission to administer the cluster. You must use Cluster Administrator to
assign permissions, not Windows Group Administrator.
The account is a domain account, which is a member of the local Administrators group.
The account is a member of the local Administrators group on each node of the cluster.
The account can be a member of other groups, such as global groups, as long as it is a domain
account.
Resource Object
NT Machine Folder
Raise event if job fails Select Yes to raise an event if the discovery job fails unexpectedly. The default is
unexpectedly Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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.
Raise event if discovery Select Yes to raise an event if discovery succeeds. The default is unselected.
succeeds?
Event severity when Set the event severity level, from 1 to 40, to reflect the importance of an event in
discovery succeeds which discovery succeeds. The default is 25.
Raise event if discovery is Select Yes to raise an event if discovery is not applicable. For example, if you run
not applicable? this Knowledge Script other than an cluster instance, discovery is not applicable.
Event severity when Set the event severity level, from 1 to 40, to reflect the importance of an event in
discovery is not applicable which discovery is not applicable. The default is 15.
NOTE:
To run this Knowledge Script on availability group listeners, you need public, read-only, view
server state, and view any definition SQL Server permission.
You must configure the users in security manager before running this script. For more information
about configuring users in security manager, see Section 2.7, “Configuring SQL Server User in
Security Manager,” on page 20.
NOTE: This module does not use the user specifications configured in Security Manager for the
earlier versions of SQL module.
Field Description
Label SQLServer
NOTE: Type blank in this field if the password in the Value 1 field is
left empty, that is, the user account does not have a password.
Extended application support Required field. Encrypts the user name and password in Security
Manager. Do not leave this option unselected.
NOTE: This feature is only supported on AppManager for Microsoft SQL Server 8.2 or later.
To use a non-default TCP port for the SQL Server or the Availability Group Listener, use the following
configuration:
Field Description
Label SQLServer
Value 1 Specify the TCP port. For example: 1469, where 1469 is the TCP
port used by the SQL Server or the Availability Group Listener.
Extended application support Required field. Encrypts the user name and password in Security
Manager. Do not leave this option unselected.
The users that you specify in the Knowledge Script must be configured in Security Manager before
running the script. For more information, see Section 2.7.1, “Configuring SQL Server User,” on
page 20.
NOTE: When running a Knowledge Script, you can specify only one default user in the User name
parameter.
The different use cases below provide examples of different types of authentication. All the users in
the examples are already configured in Security Manager.
The user name without any instance name is used as the default user for all instances.
Use Case 3 - User Name with Specific Instances and Default User
Use amdom001\user1,amdom001\user2$SQLServerInst1 for User name in a Knowledge Script.
When you run this script on three instances, SQLServerInst1, SQLServerInst2, and
SQLServerInst3, this script runs on all the instances successfully. On SQLServerInst1 instance, this
script uses this amdom001\user2$SQLServerInst1 user configuration and on SQLServerInst2, and
SQLServerInst3, this script uses the amdom001\user1 user configuration.
The user name without any instance name is used as the default user for all instances.
NOTE: User with a specific instance takes precedence over the default user.
Use Case 4 - User Name with Specific Instances and Default User in Incorrect
Format
Use amdom001\user2$SQLServerInst1,user1 for User name in a Knowledge Script. When you run
this script on three instances, SQLServerInst1, SQLServerInst2, and SQLServerInst3, this script
runs properly on SQLServerInst1 instance. This script fails on SQLServerInst2, and
SQLServerInst3, because the user name is not formatted properly in the DomainName\UserName
format.
Use Case 3 - User Name with Specific Instances and Default User
Use sa,sa1$SQLServerInst1 for User name in a Knowledge Script. When you run this script on three
instances, SQLServerInst1, SQLServerInst2, and SQLServerInst3, this script runs on all the
instances successfully. On SQLServerInst1 instance, this script uses this sa1$SQLServerInst1 user
configuration and on SQLServerInst2, and SQLServerInst3, this script uses the sa user
configuration.
The user name without any instance name is used as the default user for all instances.
NOTE: User with a specific instance takes precedence over the default user.
The figure below displays the user specifications that is used by SQL Server instances while running
a knowledge script.
Knowledge Script
username
username username$inst1
username$inst1 username$inst2
username$inst2 username$inst3
As a result, if this module includes any changes to the default values for any Knowledge Script
parameter, the module upgrade process ignores those changes and retains all parameter values that
you updated. Unless you review the management guide or the online Help for that Knowledge Script,
you will not know about any changes to default parameter values that came with this release.
You can push the changes for updated scripts to running Knowledge Script jobs in one of the
following ways:
For more information, see the Help for the AMAdmin_UpgradeJobs Knowledge Script.
Before propagating script changes, verify that the script parameters are set to your specifications.
You might need to appropriately set new parameters for your environment or application.
If you are not using AppManager 8.x or later, customized script parameters might have reverted to
default parameters during the installation of the module.
You can choose to propagate only properties (specified in the Schedule and Values tabs), only the
script (which is the logic of the Knowledge Script), or both. Unless you know specifically that changes
affect only the script logic, you should propagate the properties and the script.
For more information about propagating Knowledge Script changes, see the “Running Monitoring
Jobs” chapter of the Control Center User Guide for AppManager.
You can also propagate the properties and logic of a Knowledge Script to corresponding Knowledge
Script Group members. After you propagate script changes to Knowledge Script Group members,
you can propagate the updated Knowledge Script Group members to associated running jobs. Any
monitoring jobs started by a Knowledge Script Group member are restarted with the job properties of
the Knowledge Script Group member.
1 In the Knowledge Script view, select the Knowledge Script or Knowledge Script Group for which
you want to propagate changes.
2 Right-click the script or group and select Properties propagation > Ad Hoc Jobs.
3 Select the components of the Knowledge Script that you want to propagate to associated ad hoc
jobs or groups and click OK:
Select To propagate
Properties Values from the Knowledge Script Schedule and Values tabs, such as schedule,
monitoring values, actions, and advanced options. If you are using AppManager
8.x or later, the module upgrade process now retains any changes you might have
made to the parameter settings for the Knowledge Scripts in the previous version
of this module.
AppManager provides the following Knowledge Scripts for monitoring SQL Server version 2005 and
later. The SQLServer category of Knowledge Scripts is supported for SQL Server resources installed
in clustered and non-clustered environments.
When deciding which Knowledge Scripts to run and the appropriate threshold values to use, consider
how other applications you manage are dependent on SQL Server.
To run these Knowledge Scripts, you must require a minimum of Public and read-only SQL Server
permissions. There are few Knowledge Scripts that require specific SQL Server permission. The
following graphic displays the permissions required to run the Knowledge Scripts.x
Discovery_SQLServer
DBMirrorStatus
DBStats
Select permission on
msdb..sysjobs,
msdb..sysjobservers
MonitorJobs
Blocked Processes
DBLocks
NearMaxConnect
View Server State
NearMaxLocks
TopResourceUsers
Discovery_SQLServer
Accessibility Read-only,
View Server State,
DataSpace View Any Definitions
permissions on
DBLocks AlwaysOn Availability
Group Databases
DBStats
LogSpace
Accessibility Monitors SQL Server database accessibility and raises an event if specified
database is not accessible.
AvailabilityGroupOwner Determines the node ownership of a SQL Server AlwaysOn Availability Group.
BackupJob Monitors SQL Server backup jobs to track data backup activities optimally.
BlockedProcesses Monitors the number of SQL Server processes that have been queued for
longer than the period of time you specify.
CacheHitRatio Monitors the percentage at which the requested data page is retrieved from
the SQL Server cache without performing physical reads from disk.
Connectivity Monitors SQL Server connectivity and raises an event if the server is not
available during the monitoring interval.
DataSpace Monitors the available data space and the percentage of data space used by
each database.
DBLocks Monitors the number of locks per SQL Server database and raises an event if
the number of locks exceeds the threshold you specify.
DBStats Monitors the percentage of used space for data and log files.
ErrorLog Monitors the SQL Server error logs and looks for any error log entries that
have appeared since the last monitoring interval. This script also scans the
error log entries for any new entries created since the last time it checked.
LogSpace Monitors the available log space and used log space of a database and raises
an event if the available log space falls below the threshold, or if the
percentage of log space used exceeds the threshold you specify.
MonitorJobs Reports on any scheduled jobs that have not completed successfully.
NearMaxLocks Monitors the used number of locks compared to the maximum available locks
configured for the SQL Server.
ServerDown Monitors the up or down status of SQL Server and also identifies the downtime
of the SQL Server since the server was started.
SQLClusterOwner Determines the node ownership of a SQL Server failover cluster instance.
TopResourceUsers Monitors the total CPU time used by SQL Server users, the number of IO
operations performed, the total number of locks held by all SQL Server users
and their connections, and the number of memory pages that can be allocated
to all SQL Server users and their connections.
UserConnections Monitors the total number of user connections currently connected to SQL
Server and raises an event if the total number of user connections exceeds the
threshold you specify.
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
Default Schedule
The default interval for this script is Once every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_Accessibility job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Timeout Specify the number of seconds to wait for a response before retrying or
determining the database is inaccessible. The default is 30 seconds.
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 Specify the name of the databases you want to exclude from monitoring,
exclude (comma- separated by commas.
separated)
You can use standard pattern-matching characters when specifying database
names:
Specify file path containing Specify the full file path of .csv or .txt format file that contains the name of the
list of databases to exclude databases that you want to exclude from monitoring.
Include detail report in data Select Yes to include a detail report in the data points collected for charts and
points reports. The default is unselected.
Exclude monitoring Select Yes to exclude the monitoring of the availability group databases that are
availability group databases under the SQL Server instance. The default is unselected.
under SQL Server
instance?
Exclude monitoring loading Select Yes to exclude the monitoring of the SQL Server databases that are in
or restoring databases loading or restoring state under the SQL Server instance. The default is
under SQL Server unselected.
instance?
Event Notification
Raise event if database Select Yes to raise an event if database accessibility is below the threshold you
accessibility is below specify. The default is Yes.
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
database accessibility is which the database is not accessible. The default is 5.
below threshold
Threshold - Minimum Specify the minimum percentage of database accessibility that should be reached
accessibility before generating an event. The default is 100 percent.
Data Collection
Collect data for database Select Yes to collect data for charts and reports. If enabled, data collection
accessibility? returns the following:
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 Select Yes to collect data for each database for charts and reports. If enabled,
database accessibility? 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.
3.2 AvailabilityGroupHealth
Use this Knowledge Script to monitor the AlwaysOn availability group health status, replica
synchronization status, replica failover readiness, and operational status.
This script raises an event if the availability group status is not healthy, replica databases are not
synchronized properly, there is a potential data loss during a failover, or operational state is offline/
failed.
Resource Object
Availability Groups
Default Schedule
The default interval for this script is Every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_AvailabilityGroupHealth job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Include results in data Select Yes to include the results in the data detail message.
details?
By default, query results are not included.
Event Notification
Raise event if availability Select Yes to raise an event if the availability group status is not healthy. The
group state is not default is Yes.
healthy?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
availability group state is which the availability group status is not healthy. The default is 5.
not healthy
Raise event if availability Select Yes to raise an event if the availability group replica is not synchronized
replica is not properly. The default is Yes.
synchronized?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
availability replica is not that is raised when the availability group replica is not synchronized. The default
synchronized is 5.
Raise event if availability Select Yes to raise an event if the availability group replica failed over with
replica failed over with potential data loss. The default is Yes.
potential data loss?
Event severity when the Set the event severity level, from 1 to 40, to indicate the importance of an event
availability replica failed that is raised when the availability group replica failed over with potential data
over with potential data loss loss. The default is 5.
Raise event if operational Select Yes to raise an event if the operational state of the availability group
state of the availability replica is offline or failed. The default is Yes.
replica is offline/failed?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
operational state of the that is raised when the operational state of the availability group replica is offline
availability replica is offline/ or failed. The default is 5.
failed
Data Collection
Collect data for availability Select Yes to collect data for the availability group health status for charts and
group health status? reports. The default is unselected.
Collect data for availability Select Yes to collect data for the availability group replica synchronization status
replica synchronization for charts and reports. The default is unselected.
state?
Collect data for availability Select Yes to collect data for the potential data loss when the availability group
replica failed over with replica failed over, for charts and reports. The default is unselected.
potential data loss?
Collect data for availability Select Yes to collect data for the availability group replica operational state for
group replica operational charts and reports. The default is unselected.
state?
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.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_AvailabilityGroupOwner job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL server fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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,” on page 21.
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 Select Yes to raise an event if the availability group owner is changed. The
is changed? default is Yes.
Event severity when owner Set the event severity level, from 1 to 40, to indicate the importance of an event
node is changed that is raised when the availability group owner has changed. The default is 5.
Raise event to show the Select Yes to raise an event to display the availability group owner in the first
owner node in first iteration. The default is unselected.
iteration?
Event severity to show the Set the event severity level, from 1 to 40, to indicate the importance of an event to
owner node in first iteration display the availability group owner in the first iteration. The default is 25.
Data Collection
Collect data for owner node Select Yes to collect availability group owner node status data for charts and
state? reports. The default is unselected.
3.4 BackupJob
Use this Knowledge Script to monitor SQL Server backup jobs. Using this script, administrators can
track data backup activities optimally.
This Knowledge Script uses the SQL Server error logs (Errorlog, Errorlog.* in the SQL Server log
folder). Ensure that the user has read permission to this files/folders.
On the first job iteration, this script sets a starting point for future log scanning and does not scan the
existing entries in the logs. Therefore, it does not return any results on the first iteration. As it
continues to run at the interval specified in the Schedule tab, this script scans the logs for any new
entries created since the last time it checked.
This script raises an event if the number of successful backup records exceeds the threshold you
specify, and if the backup fails for any reason.
Resource Object
SQL Server instance
Default Schedule
The default interval for this script is Every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_BackupJob fails unexpectedly. The
unexpectedly? default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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.
Event Notification
Raise event if backup job Select Yes to raise an event if a backup job fails. The default is Yes.
fails?
Event severity when backup Set the event severity level, from 1 to 40, to indicate the importance of an event
job fails that is raised when the backup job fails. The default is 5.
Threshold -- Maximum Specify the number of backup jobs that should get failed before raising an event.
failed backup jobs The default is 0.
Raise event if successful Select Yes to raise an event if the number of successful backup jobs exceeds the
backup jobs exceed threshold. The default is unselected.
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
successful backup jobs which the number of successful backup jobs exceeds the threshold. The default
exceed threshold is 15.
Threshold -- Maximum Specify the number of backup jobs that should be successful before raising an
successful backup jobs event. The default is 10.
Data Collection
Collect data for failed Select Yes to collect backup jobs data for charts and reports. If enabled, data
backup jobs? collection returns the number of failed backup jobs. The default is unselected.
Collect data for successful Select Yes to collect backup jobs data for charts and reports. If enabled, data
backup jobs? collection returns the number of successful backup jobs. The default is
unselected.
3.5 BlockedProcesses
Use this Knowledge Script to monitor the number of SQL Server processes that are queued for longer
than the period of time you specify. You can set a threshold to determine how long a process can be
in queue before it is considered blocked. This script raises an event when the number of blocked
processes exceeds a threshold you specify.
Resource Object
SQL Server instance
Default Schedule
The default interval for this script is Once every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_BlockedProcess job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Include detail report in data Select Yes to include a detail report in the data points collected for charts and
points? reports. The default is unselected.
Number of blocked Specify the number of processes to display in the report pane of the console. The
processes to include in default is 20 blocked processes. Enter 0 to display all blocked processes.
report
Include the T-SQL Select Yes to include the T-SQL statement associated with each blocked
statement for each blocked process. The default is unselected.
process?
Timeout Specify the number of seconds that the Knowledge Script should wait to get the
T-SQL statement before raising a timeout exception. The default is 30 seconds.
Event Notification
Raise event if number of Select Yes to raise an event if the number of blocked processes exceeds the
blocked processes threshold. The default is Yes.
exceeds threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
number of blocked which the number of blocked processes exceeds the threshold. The default is 5.
processes exceeds
threshold
Threshold -- Maximum Specify the maximum number of processes that can be blocked before an event
number of blocked is raised. The default is 5 blocked processes.
processes
Threshold -- Maximum Specify the maximum length of time a process can be queued before it is
waiting time in queue considered a blocked process. The default is 500 milliseconds.
Data Collection
Collect data for total Select Yes to collect data for charts and reports. If enabled, data collection
number of blocked returns the total number of blocked processes. The default is unselected.
processes?
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.
3.6 CacheHitRatio
Use this Knowledge Script to monitor the percentage at which a requested data page is retrieved
from the SQL Server data cache without performing physical reads from disk. This script raises an
event if the cache hit ratio falls below the threshold you specify.
Resource Object
SQL Server instance
Default Schedule
The default interval for this script is Once every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_CacheHitRatio job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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.
Event Notification
Raise event if cache hit Select Yes to raise an event when the cache hit ratio falls below the threshold.
ratio is below threshold? The default is Yes.
Event severity if cache hit Set the event severity level, from 1 to 40, to indicate the importance of an event in
ratio is below threshold which the cache hit ratio falls below the threshold. The default is 5.
Threshold -- Minimum Specify the minimum percentage that requested data pages can be retrieved in
cache hit ratio the data cache before an event is raised.
Ideally this percentage should be set relatively high, because the more frequently
SQL Server uses the data cache, the better your database performance. When
SQL Server accesses information in the data cache less frequently than the
threshold you specify, for example only 50% of the time, an event informs you
that database performance has deteriorated. The default is 90%.
Data Collection
Collect data for cache hit Select Yes to collect data for charts and reports. If enabled, data collection
ratio? returns the cache hit percentage. 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.
3.7 Connectivity
Use this Knowledge Script to monitor SQL Server connectivity. You can set a timeout to determine the
number of times the script should attempt to contact the server.
This script raises an event if, during any monitoring interval, the number of times the server is not
available exceeds the number of retries you specify.
NOTE: To run this Knowledge Script, you need public and read-only SQL Server permission.
Default Schedule
The default interval for this script is Every five minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_Connectivity job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Timeout Specify the maximum number of seconds the Connectivity script should wait for a
response from server before retrying. The default is 30 seconds.
Number of retries Specify the number of times the Connectivity script must retry connecting to the
SQL Server before determining that the server is inaccessible. The default is 0.
Event Notification
Raise event if connection Select Yes to raise an event if the connection to a server or an instance fails. The
with SQL server fails? default is Yes.
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
connection with SQL server which the connection with a server fails. The default is 5.
fails
Data Collection
Collect data for server Select Yes to collect server connectivity data for charts and reports. The default is
connectivity? 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.
3.8 CPUUtil
Use this Knowledge Script to monitor the percentage of CPU resources used by the sqlservr,
sqlagent, and sqlexec processes. This script raises an event if the CPU usage for SQL Server
processes exceeds the threshold you set.
Resource Object
Microsoft SQL Server
Default Schedule
The default schedule for this script is Every 10 minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_CPUUtil job fails unexpectedly.
unexpectedly? The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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.
Include detail report in data Select Yes to include a detail report in the data points collected for charts and
point? reports. The default is unselected.
Event Notification
Raise event if CPU Select Yes to raise an event if a process uses CPU more than the threshold. The
utilization for a process default is Yes.
exceeds threshold?
Event severity when CPU Set the event severity level, from 1 to 40, to indicate the importance of an event in
utilization for a process which a process uses CPU more than the threshold. The default is 5.
exceeds threshold
Threshold- Maximum CPU Specify the maximum CPU usage for a process that can be in use before an
utilization for a process event is raised. The default is 55%.
Raise event if total CPU Select Yes to raise an event if the total CPU usage for all the processes exceeds
utilization for all the the threshold. The default is Yes.
processes exceeds
threshold?
Event severity when total Set the event severity level, from 1 to 40, to indicate the importance of an event in
CPU utilization for all which the total CPU usage for all the processes exceeds the threshold. The
processes exceeds default is 5.
threshold
Threshold- Maximum CPU Specify the maximum CPU usage for all processes that can be in use before an
utilization for all processes event is raised. The default is 90%.
Data Collection
Collect data for CPU Select Yes to collect data for charts and reports. If enabled, data collection
utilization for each process? returns the percentage of CPU utilization for a process. The default is unselected.
Collect data for CPU Select Yes to collect data for charts and reports. If enabled, data collection
utilization for all processes? returns the percentage of total CPU utilization for all process. The default is
unselected.
3.9 DataSpace
Use this Knowledge Script to monitor available data space and the percentage of data space used by
each database. This script raises an event if the amount of available data space, in MB, is lower than
the threshold you specify. This script also raises an event if the percentage of used data space is
higher than the threshold you specify.
You can set this script to observe new databases dynamically each time it runs. Observing databases
dynamically allows you to monitor data space for newly created SQL Server databases since you ran
the Discovery_SQLServer Knowledge Script and prevents you from attempting to monitor databases
that have been dropped since discovery.
NOTE
Although this script can observe databases each time it runs, the new databases are not
reflected in the Operator Console or Control Center.
To run this Knowledge Script, you need public and read-only permissions 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 Objects
System or User Databases
If you are not observing databases dynamically, you can run this script on a Database folder or
individual database objects. Dynamic observation monitors all databases regardless of target
resource object.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_DataSpace job fails unexpectedly.
unexpectedly? The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails that is raised when the login to SQL server fails. The default is 15.
Raise event if database is Select Yes to raise an event if a database is offline. The default is unselected.
offline?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
database is offline that is raised when a database is offline. The default is 15.
Raise event if database is Select Yes to raise an event if a database is deleted. The default is unselected.
deleted?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
database is deleted that is raised when a database is deleted. 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Dynamically observe Select Yes to dynamically observe databases at each monitoring interval. The
databases at each interval? default is unselected.
Exclude monitoring loading Select Yes to exclude the monitoring of the SQL Server databases that are in
or restoring databases loading or restoring state under the SQL Server instance. The default is
under SQL Server unselected.
instance?
Specify list of databases to Specify the name of the databases you want to exclude from monitoring,
exclude (comma- separated by commas.
separated)
You can use standard pattern-matching characters when specifying database
names:
Specify file path containing Specify the full file path of .csv or .txt format file that contains the name of the
list of databases to exclude databases that you want to exclude from monitoring.
The databases specified in the file are excluded even if dynamic monitoring is not
enabled.
You can use standard pattern-matching characters when specifying data space
names:
Exclude monitoring Select Yes to exclude the monitoring of the availability group databases that are
availability group databases under the SQL Server instance. The default is unselected.
under SQL Server
instance?
Event Notification
Raise event if used data Select Yes to raise an event if the percentage of used data space exceeds the
space exceeds threshold you specify. The default is Yes.
threshold?
Event severity when used Set the event severity level, from 1 to 40, to indicate the importance of an event in
data space exceeds which the percentage of used data space exceeds the threshold. The default is 5.
threshold
Threshold - Maximum Specify the maximum percentage of data space that can be in use before an
percentage of used data event is raised. The default is 90%.
space
Raise event if available Select Yes to raise an event if the available data space falls below the threshold
data space falls below you specify. The default is Yes.
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
available data space falls which the amount of available data space falls below the threshold. The default is
below threshold 5.
Threshold - Minimum Specify the minimum amount of data space that is required to be available before
available data space an event is raised. If the amount of available data space falls below this threshold,
an event is raised. The default is 0 MB.
Data Collection
Collect data for used data Select Yes to collect data for charts and reports. If enabled, data collection
space? returns the percentage of data space used for each database. The default is
unselected.
Collect data for available Select Yes to collect data for charts and reports. If enabled, data collection
data space? returns the available data space (in MB) for each database. The default is
unselected.
3.10 DBLocks
Use this Knowledge Script to monitor the number of locks per SQL Server database. This script
raises an event if the number of locks exceeds the threshold. In addition, this script generates data
streams for the number of locks, and you can include a report of locks in the events and data for this
script. All the databases in the SQL Server are monitored if dynamic observation of databases is
enabled, unless you exclude them.
You can set this script to observe new databases dynamically each time it runs. Observing databases
dynamically allows you to monitor locks for newly created SQL Server databases since you ran the
Discovery_SQLServer Knowledge Script and prevents you from attempting to monitor databases that
have been dropped since discovery.
NOTE
Although this script can observe databases each time it runs, the new databases are not
reflected in the Operator Console or Control Center.
To run this Knowledge Script, you need public and view server state SQL Server
permissions.
This Knowledge Script monitors the availability group databases in both primary and secondary
replica irrespective of the configuration of the Readable Secondary option of the secondary
replica, because this Knowledge Script retrieves the lock information from system.master
database.
Resource Objects
System or User Databases
If you are not observing databases dynamically, you can run this script on a Database folder or
individual database objects. Dynamic observation monitors all databases regardless of target
resource object.
Default Schedule
The default interval for this script is Every 30 minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_DBLocks job fails unexpectedly.
unexpectedly? The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL server fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails that is raised when the login to SQL server fails. The default is 15.
Raise event if database is Select Yes to raise an event if a database is offline. The default is unselected.
offline?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
database is offline that is raised when a database is offline. The default is 15.
Raise event if database is Select Yes to raise an event if a database is deleted. The default is unselected.
deleted?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
database is deleted that is raised when a database is deleted. 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Dynamically observe Select Yes to dynamically observe databases at each monitoring interval. The
databases at each interval? default is unselected.
Specify list of databases to Specify the name of the databases you want to exclude from monitoring,
exclude (comma- separated by commas.
separated)
You can use standard pattern-matching characters when specifying database
names:
Specify file path containing Specify the full file path of .csv or .txt format file that contains the name of the
list of databases to exclude databases that you want to exclude from monitoring.
The databases specified in the file are excluded even if dynamic monitoring is not
enabled.
Include database locks Select to Yes to include a report of the number of database locks in the events
report in events? generated for this script. The default is Yes.
Include database locks Select Yes to include a report of the number of database locks in the data for
report in data? charts and reports. The default is Yes.
Maximum locks to report (0 Set the maximum number of locks you want the script to report on for events and
for maximum) data. The default is 0.
Exclude monitoring Select Yes to exclude monitoring the availability group databases that are under
availability group databases the SQL Server instance. The default is unselected.
under SQL Server
instance?
Event Notification
Raise event if locks Select Yes to raise an event when the number of locks for a database exceeds
exceed threshold? the threshold. The default is Yes.
Event severity when locks Set the event severity level, from 1 to 40, to indicate the importance of an event in
exceed threshold which the number of locks held exceeds the threshold. The default is 5.
Threshold -- Maximum Specify the maximum number of locks that can be held on a database before an
number of database locks event is raised. The default is 10 locks.
Data Collection
Collect data for number of Select Yes to collect data for charts and reports. If enabled, data collection returns
database locks? the number of locks held on a database, and identifies the application and user
holding each lock. The default is unselected.
Resource Objects
Microsoft SQL Server
Default Schedule
The default interval for this script is Every 10 minutes.
General Settings
Raise events if job fails Select Yes to raise an event if the SQLServer_DBMirrorStatus job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise events if SQL Select Yes to raise an event if login to SQL Server fails. The default is Yes.
Server login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Monitor DB Mirroring
Event Notification
Raise an event if Mirror Set to Yes to raise an event if the Mirror State changes. The default is Yes.
State changes?
Event severity when Mirror Set the event severity level, from 1 to 40, to indicate the importance of the event if
State changes the Mirror State changes. The default severity level is 5 (red event indicator).
Raise an event if Mirror Set to Yes to raise an event if the Mirror Role or the Mirror Role Sequence
Role or Sequence changes. The default is Yes.
changes?
Event severity when Mirror Set the event severity level, from 1 to 40, to indicate the importance of the event if
Role or Sequence changes the Mirror Role or the Mirror Role Sequence changes. The default severity level is
5 (red event indicator).
Raise an event if Mirror Set to Yes to raise an event if the Mirror Safety Level changes. The default is Yes.
Safety Level changes?
Event severity when Mirror Set the event severity level, from 1 to 40, to indicate the importance of the event if
Safety Level changes the Mirror Safety Level changes. The default severity level is 5 (red event
indicator).
Raise an event if Mirror Set to Yes to raise an event if the Mirror Safety Sequence changes. The default is
Safety Sequence Yes.
changes?
Event severity when Mirror Set the event severity level, from 1 to 40, to indicate the importance of the event if
Safety Sequence changes the Mirror Safety Sequence changes. The default severity level is 5 (red event
indicator)
Raise an event if Mirror Set to Yes to raise an event if the Mirror Partner changes. The default is Yes.
Partner changes?
Event severity when Mirror Set the event severity level, from 1 to 40, to indicate the importance of the event if
Partner changes the Mirror Partner changes. The default severity level is 5 (red event indicator).
Raise an event if Mirror Set to Yes to raise an event if the Mirror Witness changes. The default is Yes.
Witness changes?
Event severity when Mirror Set the event severity level, from 1 to 40, to indicate the importance of the event if
Witness changes the Mirror Witness changes. The default severity level is 5 (red event indicator).
Raise an event if Mirror Set to Yes to raise an event if the Mirror Witness State changes. The default is
Witness State changes? Yes.
Event severity when Mirror Set the event severity level, from 1 to 40, to indicate the importance of the event if
Witness State changes the Mirror Witness State changes. The default severity level is 5 (red event
indicator)
Raise an event if no Set to Yes to raise an event if no mirrored databases are found. The default is No.
mirrored databases
found?
Event severity when no Set the event severity level, from 1 to 40, to indicate the importance of the event if
mirrored databases found no mirrored databases are found. The default severity level is 25 (blue level
indicator).
Raise an event if a new Set to Yes to raise an event if a new database is mirrored. The default is Yes.
database is Mirrored?
Event severity when a new Set the event severity level, from 1 to 40, to indicate the importance of the event if
database is Mirrored a new database is mirrored. The default severity level is 25 (blue level indicator).
Raise an event if a Set to Yes to raise an event if a database is removed from mirroring. The default
database is removed from is Yes.
Mirroring?
Event severity when a Set the event severity level, from 1 to 40, to indicate the importance of the event if
database is removed from a database is removed from mirroring. The default severity level is 5 (red event
Mirroring indicator).
Data Collection
Collect data for Database Select Yes to collect data for the role of a Mirrored database. If selected, data
Mirroring Role? collection returns the following:
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.
3.12 DBStats
Use this Knowledge Script to monitor the amount of allocated space used by the data and the log
files. Separate thresholds are available for the files whose size is set as auto-grow and for those
whose size is not set as auto-grow.
If a file is not set as auto-grow, the percentage of used space is compared to the total space allocated
for the file. This script then raises an event if the percentage of used space exceeds the threshold you
specify.
If a file is set as auto-grow and a maximum file size is specified in the SQL Server, the percentage of
used space is compared to the maximum file size is specified in the SQL Server. This script then
raises an event if the percentage of used space exceeds the threshold you specify.
If a file is set to auto-grow and maximum file size is configured as 'Unrestricted File Growth' in SQL
Server, then no event is raised. However, data collection collects the details for the file size compared
to the total database file size allocated.
NOTE: .
To run this Knowledge Script, you need public and read-only permissions 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 Objects
SQL Server instance or Database folder, if dynamically observing databases. If you are not observing
databases dynamically, you can run this script on the Database folder or on individual database
objects.
If you run the script on a individual database object, only that object is monitored regardless of how
you set the Dynamically observe databases at each interval? parameter.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_DBStats job fails unexpectedly.
unexpectedly? The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails that is raised when the login to SQL server fails. The default is 15.
Raise event if database is Select Yes to raise an event if a database is offline. The default is unselected.
offline?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
database is offline that is raised when a database is offline. The default is 15.
Raise event if database is Select Yes to raise an event if a database is deleted. The default is unselected.
deleted?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
database is deleted that is raised when a database is deleted. 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Dynamically observe Select Yes to dynamically observe databases at each monitoring interval. The
databases at each interval? default is unselected.
Exclude monitoring loading Select Yes to exclude the monitoring of the SQL Server databases that are in
or restoring databases loading or restoring state under the SQL Server instance. The default is
under SQL Server unselected.
instance?
Specify list of databases to Specify the name of the databases you want to exclude from monitoring,
exclude (comma- separated by commas.
separated)
You can use standard pattern-matching characters when specifying database
names:
Specify file path containing Specify the full file path of .csv or .txt format file that contains the name of the
list of databases to exclude databases that you want to exclude from monitoring.
The databases specified in the file are excluded even if dynamic monitoring is not
enabled.
Exclude monitoring Select Yes to exclude the monitoring of the availability group databases that are
availability group databases under the SQL Server instance. The default is unselected.
under SQL Server
instance?
Event Notification
Raise event if used data Select Yes to raise an event if the used data space value exceeds the threshold
space exceeds you specify. The default is Yes.
threshold?
Event severity when used Set the event severity level, from 1 to 40, to indicate the importance of an event in
data space exceeds which the used data space value exceeds the threshold. The default is 5.
threshold
Threshold -- Maximum Specify the maximum percentage of data space that can be used before an event
percentage of used data is raised. The percentage usage of data space is compared to the total space
space if database can grow available for the database in SQL Server. The default is 90%.
Threshold -- Maximum Specify the maximum percentage of data space that can be used before an event
percentage of used data is raised. The percentage usage of data space is compared to the space
space if database cannot allocated for the data space, The default is 90%.
grow
Raise event if used data Select Yes to raise an event if the used data space value falls below the threshold
space falls below you specify. The default is Yes.
threshold?
Event severity when used Set the event severity level, from 1 to 40, to indicate the importance of an event in
data space falls below which the data space value that is currently in use falls below the threshold. The
threshold default is 5.
Threshold -- Minimum used Specify the minimum disk space in MB that is required for the data. If the amount
data space of disk space falls below this threshold, an event is raised.The default is 0 MB.
Raise event if used log Select Yes to raise an event if the used log space value exceeds the threshold
space exceeds you specify. The default is Yes.
threshold?
Event severity when used Set the event severity level, from 1 to 40, to indicate the importance of an event in
log space exceeds which the used log space value exceeds the threshold. The default is 5.
threshold
Threshold -- Maximum Specify the maximum percentage of log space in comparison to the maximum log
percentage of used log space specified in the SQL Server, that can be used before an event is raised.
space if log space can grow The default is 90%.
Threshold -- Maximum Specify the maximum percentage of log space in comparison to the total log
percentage of used log space specified in the SQL Server, that can be used before an event is raised.
space if log space cannot The default is 90%.
grow
Raise event if used log Select Yes to raise an event if the used log space value falls below the threshold
space falls below you specify. The default is Yes.
threshold?
Event severity when used Set the event severity level, from 1 to 40, to indicate the importance of an event in
log space falls below which the used log space value that is currently in use falls below the threshold.
threshold The default is 5.
Threshold -- Minimum used Specify the minimum disk space in MB that is required for the database’s log
log space space. If the amount of disk space falls below this threshold, an event is
raised.The default is 0 MB.
Raise event if total used Select Yes to raise an event if the total used database space exceeds threshold
database space exceeds you specify. The default is Yes.
threshold?
Event severity when total Set the event severity level, from 1 to 40, to indicate the importance of an event in
used database space which the total used database space exceeds the threshold. The default is 5.
exceeds threshold
Threshold- Maximum Specify the maximum percentage of total used database space, that can be used
percentage of total used before an event is raised. The default is 90%.
database space
Raise event if total Select Yes to raise an event if the total available database space falls below the
available database space threshold you specify. The default is Yes.
falls below threshold?
Event severity when total Set the event severity level, from 1 to 40, to indicate the importance of an event in
available database space which the total used database falls below the threshold. The default is 5.
falls below threshold
Threshold- Minimum total Specify the minimum total database space that is required for the data. If the
database space available amount of database space falls below this threshold, an event is raised.The
default is 0 MB.
Data Collection
Collect data for data Select Yes to collect data for charts and reports. If enabled, data collection
utilization (%)? returns the percentage of allocated data space that is currently in use. The default
is unselected
Collect data for allocated Select Yes to collect data for charts and reports. If enabled, data collection
data space (MB)? returns the data space size in MB that is currently allocated for a specific
database. The default is unselected.
Collect data for used data Select Yes to collect data for charts and reports. If enabled, data collection
space (MB)? returns the data space size in MB that is currently in use for a specific database.
The default is unselected.
Collect data for log Select Yes to collect data for charts and reports. If enabled, data collection
utilization (%)? returns the percentage of allocated log space that is currently in use. The default
is unselected
Collect data for allocated Select Yes to collect data for charts and reports. If enabled, data collection
log space (MB)? returns the log space size in MB that is currently allocated for a specific database.
The default is unselected.
Collect data for used log Select Yes to collect data for charts and reports. If enabled, data collection
space (MB)? returns the log space size in MB that is currently in use for a specific database.
The default is unselected.
Collect data for total Select Yes to collect data for charts and reports. If enabled, data collection
database size (MB)? returns the size of the total database in MB. The default is unselected.
Collect data for total Select Yes to collect data for charts and reports. If enabled, data collection
database space utilization returns the percentage of total database space used. The default is unselected.
(%)?
Collect data for total Select Yes to collect data for charts and reports. If enabled, data collection
database space available returns the available database space in MB. The default is unselected
(MB)?
3.13 ErrorLog
Use this Knowledge Script to monitor the SQL Server error logs (Errorlog, Errorlog.* in the SQL
Server log folder). Ensure that the user has read permission to this files/folders.
On the first job iteration, this script sets a starting point for next iteration log scanning and does not
scan the existing entries in the logs. As a result, it does not return any results on the first iteration. As
it continues to run at the interval specified in the Schedule tab, this script looks for any error log
entries that have appeared since the last monitoring interval.
This script looks for the matching log text you specified in the Log text to match parameter. If you
disable the Literal match? parameter, log text containing any of the words you specified is considered
a match. This script raises an event if the number of entries that match the Log text to match criteria
exceeds the threshold you specify.
Default Schedule
The default interval for this script is Once every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_ErrorLog job fails unexpectedly.
unexpectedly? The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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.
Log text to match Specify all or part of the string you want to check for. Separate multiple search
strings with commas.
NOTE: The text string Wait-for graph can be used to catch deadlocks that
might occur on the SQL Server instance you are monitoring. However, if this
string is used, the SQL Server instance must have additional tracing enabled. For
more information, see Microsoft Knowledge Base article 832524.
Literal match? Select Yes if you want to search for the entire search string. For example, if you
set this parameter to Yes and specify “foo bar” as the search string, only lines
containing “foo bar” are considered a match. The default is Yes.
Select No to match any of the words in the Log text to match parameter value.
For example, if you set this parameter to No and specify “foo bar” as the search
string, any lines that contain “foo,” “bar,” or “foo bar” are considered a match.
Case-sensitive? Select Yes to match upper and lower case letters when checking for a match to
the search string. The default is No.
Text to exclude Specify a string or series of strings that you want to exclude from the search
results. Use comma to separate multiple strings.
Event Notification
Raise event if number of Select Yes to raise an event if new log entries are found. The default is Yes.
new log entries exceed
threshold? NOTE: In general, the detail message for the Knowledge Script contains details
about the occurrences found. If the message is larger than 32 KB, the data is
saved in a file on the managed computer in the \NetIQ\AppManager\bin folder,
and the detail message contains the truncated data. If you generate these log
files, you should periodically remove the files when you are done with them.
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
number of new log entries which the number of new log entries exceed the threshold. The default is 5.
exceed threshold
Threshold -- Maximum Specify the number of entries that can be logged before an event is raised. The
number of new log entries default is 0.
Data Collection
Collect data for number of Select Yes to collect data for the new log entries for charts and reports. If
new log entries? enabled, data collection returns the number of new event log entries.The default
is unselected.
3.14 LogShipping
Use this Knowledge Script to monitor log shipping status. Log shipping is a process in which
transaction logs from a primary Microsoft SQL Server are applied sequentially on a scheduled basis
to another Microsoft SQL Server.
On the first job iteration, this script sets a starting point for future log scanning and does not scan the
existing entries in the logs. Therefore, it does not return any results on the first iteration. As it
continues to run at the interval specified in the Schedule tab, this script scans the logs for any new
entries created since the last time it checked.
This script raises an event if the number of successful log shipping records exceeds the threshold you
specify, and if log shipping fails for any reason.
Resource Objects
Microsoft SQL Server instances
Default Schedule
The default interval for this script is Every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_LogShipping job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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.
Event Notification
Raise event if number of Select Yes to raise an event if the number of successful log shipping records
successful log shipped exceeds threshold. The default is Yes.
records exceeds
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
number of successful log which the number of successful log shipping records exceeds the threshold you
shipped records exceeds specify. The default is 25.
threshold
Threshold- Maximum Specify the maximum number of successful log shipping records that can be
number of successful log found before an event is raised. The default is 100 entries.
shipped records
Raise event if number of Select Yes to raise an event if the number of log shipping records that failed
failure log shipped exceeds the threshold. The default is Yes.
records exceeds
threshold?
Exclude monitoring of the Select Yes to exclude the monitoring of the backup errors of SQL Server
backup errors? databases. The default is unselected.
IMPORTANT: This parameter is effective only when the Raise event if number of
failure log shipped records exceeds threshold? parameter is selected.
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
number of failure log which the number of log shipping that failed exceeds the threshold you specify.
shipped records exceeds The default is 5
threshold
Threshold- Maximum Specify the maximum number of log shipping records that can fail before an event
number of failure log is raised. The default is 0.
shipped records
Data Collection
Collect data for successful Select Yes to collect data for successful log shipping records for charts and
records of log shipping? reports.The default is unselected.
Collect data for failure Select Yes to collect data for failed log shipping records for charts and reports.
records of log shipping? The default is unselected.
Custom data stream legend Specify a custom data stream legend to display in the Graph Data tab.
You can set this script to observe new databases dynamically each time it runs. Observing databases
dynamically allows you to monitor log space for newly created SQL Server databases since you ran
the Discovery_SQLServer Knowledge Script and prevents you from attempting to monitor databases
that have been dropped since discovery.
NOTE
Although this script can observe new databases each time it runs, the new databases are not
reflected in the Operator Console or Control Center.
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 Objects
System or User Databases
If you are not observing databases dynamically, you can run this script on a Database folder or
individual database objects. Dynamic observation monitors all databases regardless of target
resource object.
Default Schedule
The default interval for this script is Once every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_LogSpace job fails unexpectedly.
unexpectedly? The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails that is raised when the login to SQL server fails. The default is 15.
Raise event if database is Select Yes to raise an event if a database is offline. The default is unselected.
offline?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
database is offline that is raised when a database is offline. The default is 15.
Raise event if database is Select Yes to raise an event if a database is deleted. The default is unselected.
deleted?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event
database is deleted that is raised when a database is deleted. 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Dynamically observe Select Yes to dynamically observe databases at each monitoring interval. The
databases at each interval? default is unselected.
Exclude monitoring loading Select Yes to exclude the monitoring of the SQL Server databases that are in
or restoring databases loading or restoring state under the SQL Server instance. The default is
under SQL Server unselected.
instance?
Specify list of databases to Specify the name of the databases you want to exclude from monitoring,
exclude (comma- separated by commas.
separated)
You can use standard pattern-matching characters when specifying database
names:
Specify file path containing Specify the full file path of .csv or .txt format file that contains the name of the
list of databases to exclude databases that you want to exclude from monitoring.
The databases specified in the file are excluded even if dynamic monitoring is not
enabled.
Exclude monitoring Select Yes to exclude the monitoring of the availability group databases that are
availability group databases under the SQL Server instance. The default is unselected.
under SQL Server
instance?
Event Notification
Raise event if used log Select Yes to raise an event if the used log space value exceeds the threshold
space exceeds you specify. The default is Yes.
threshold?
Event severity when used Set the event severity level, from 1 to 40, to indicate the importance of an event in
log space exceeds which the used log space value exceeds the threshold. The default is 5.
threshold
Threshold -- Maximum Specify the maximum percentage of log space that can be used before an event
percentage of used log is raised. The default is 90%.
space
Raise event if available Select Yes to raise an event if the available log space value falls below the
log space falls below threshold you specify. The default is Yes.
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
available log space falls which the available log space value falls below the threshold. The default is 5.
below threshold
Threshold -- Minimum Specify the minimum disk space in MB that is required for the database’s log
available log space space. If the amount of disk space falls below this threshold, an event is
raised.The default is 0 MB.
Data Collection
Collect data for used log Select Yes to collect data about the used log space for charts and reports. If
space? enabled, data collection, returns the percentage of log space used for each
database. The default is unselected.
Collect data for available Select Yes to collect data about the available log space for charts and reports. If
log space? enabled, data collection, returns the available log space in MB. The default is
unselected.
Resource Object
Microsoft SQL Server
Default Schedule
The default schedule for this script is Every 10 minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_MemUtil job fails unexpectedly.
unexpectedly? The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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.
Monitor memory
utilization
Event Notification
Raise event if memory Select Yes to raise an event if the amount of memory used by the server process
usage exceeds and the agent process exceeds the threshold. The default is Yes.
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
memory usage exceeds which the amount of memory used by the server process and the agent process
threshold exceeds the threshold. The default is 5.
Threshold- Maximum Specify the maximum amount of memory that can be used by a server process
memory used by server before an event is raised. The default is 2000 MB.
process
Threshold- Maximum Specify the maximum amount of memory that can be used by an agent process
memory used by agent before an event is raised. The default is 75 MB.
process
Raise event if server Select Yes to raise an event if the amount of server memory used by Microsoft
memory usage exceeds SQL Server and all related processes exceeds the threshold. The default is Yes.
threshold?
Event severity when server Set the event severity level, from 1 to 40, to indicate the importance of an event in
memory usage exceeds which the amount of memory used by Microsoft SQL Server and all related
threshold processes exceeds the threshold. The default is 5.
Threshold- Maximum Specify the maximum amount of memory that can be consumed by Microsoft
server memory used SQL Server and all related processes before an event is raised. The default is
3000 MB.
Raise event if number of Select Yes to raise an event if the number of free buffer pages falls below the
free buffer pages are threshold. The default is unselected.
below threshold?
NOTE: This parameter is applicable for a version prior to SQL Server 2012.
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
number of free buffer pages which the number of free buffer pages falls below the threshold. The default is 5.
are below threshold
Threshold- Minimum Specify the minimum number of buffer pages that must be free to prevent an
number of free buffer pages event from being raised. The default is 50 pages.
Raise event if free Select Yes to raise an event if the free memory available with Microsoft SQL
memory is below Server falls below threshold. The default is unselected.
threshold?
NOTE: This parameter is applicable for SQL Server 2012 or a later version.
Event severity when free Set the event severity level, from 1 to 40, to indicate the importance of an event in
memory is below threshold which the free memory available with Microsoft SQL Server falls below threshold.
The default is 5.
Threshold- Minimum free Specify the amount of memory that must be free with Microsoft SQL Server to
memory prevent an event from being raised. The default is 100 MB.
Data Collection
Collect data for maximum Select Yes to collect maximum memory used data for charts and reports. If
memory used? enabled, data collection returns the maximum amount of memory used by the
server process and the agent process.
Collect data for server Select Yes to collect server memory used data for charts and reports. If enabled,
memory used? data collection returns the amount of memory used by Microsoft SQL Server and
all related processes.
Collect data for number of Select Yes to collect the number of free buffer pages for charts and reports. If
free buffer pages? enabled, data collection returns the number of buffer pages that are available.
NOTE: This parameter is applicable for a version prior to SQL Server 2012.
Collect data for free Select Yes to collect the free memory of Microsoft SQL Server for charts and
memory? reports. If enabled, data collection returns the amount of free memory available
with Microsoft SQL Server.
NOTE: This parameter is applicable for SQL Server 2012 or a later version.
NOTE: To run this Knowledge Script, you need the SQL Server Select permission on sysjobs and
sysjobservers tables of the msdb database.
Resource Objects
SQL Server instance
Default Schedule
The default interval for this script is every 10 minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_MonitorJobs job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails that is raised when the login to SQL server fails. The default is 15.
Raise event if job is Select Yes to raise an event if a job is running on SQL Express Server. The
running on SQL Express default is unselected.
Server?
SQL Server jobs are not compatible with SQL Express Server. Therefore, if a
database has an instance running SQL Express Server, AppManager raises an
event that the job is running on SQL Express Server.
Event severity when job is Set the event severity level, from 1 to 40, to indicate the importance of an event
running on SQL Express that is raised when a database is offline. The default is 15.
Server
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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Specify list of jobs to Specify the names of jobs to include in monitoring. Separate multiple names with
monitor (comma-separated) a comma. Only specified job names are included in data collection and have
events raised if job failures are detected. You can use the SQL wildcard
characters (% and _) to specify the names of the jobs. For example, if you specify
App%, the jobs that start with App will be monitored.
Monitor only new failed Select Yes to monitor the failed jobs since the last monitoring interval. The default
jobs? is Yes.
Specify the time prior to first Specify the time (in minutes) prior to first iteration from which you want to monitor
iteration from which failed the failed jobs. For example, if you set the time as 20 minutes, the Knowledge
jobs are monitored Script starts monitoring for the failed jobs starting from 20 minutes before the first
iteration. The default time is 10 minutes.
Number of SQL jobs to Specify the number of SQL jobs that a report can contain. The default is 20. Enter
include in report 0 to display all SQL jobs.
Include detail report in data Select Yes to include a detail report in the data points collected for charts and
points? reports. The default is unselected.
Event Notification
Raise event if failed Select Yes to raise an event if the number of job failures exceeds the threshold.
monitor jobs exceed The default is Yes.
threshold?
Event severity when failed Set the event severity level, from 1 to 40, to indicate the importance of an event in
monitor jobs exceed which the number of failed jobs exceeds the threshold. The default is 5.
threshold
Threshold - maximum failed Specify the maximum number of failed jobs that can be detected before an event
monitor jobs is raised. The default is 0 job.
Data Collection
Collect data for failed Select Yes to collect data for the total number of failed jobs for charts and reports.
monitor jobs? If enabled, data collection returns the number of jobs that have failed, including
the job name and the reason for the failure. The default is unselected.
3.18 NearMaxConnect
Use this Knowledge Script to monitor the SQL Server user connections utilization. This script
compares the number of user connections that are currently in use to the maximum number of
concurrent connections configured for the SQL Server. This script raises an event if the percentage of
user connections that are currently in use exceeds the threshold you set.
If you have not configured the maximum user connections in the SQL Server then this script does not
collect any data.
Resource Object
SQL Server instance
Default Schedule
The default interval for this script is Once every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_NearMaxConnect job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Event Notification
Raise event if SQL Server Select Yes to raise an event if you have configured the Maximum number of
is configured for concurrent connections option in SQL Server properties as unlimited. The
unlimited concurrent default is Yes.
connections?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event in
Server is configured for which Maximum number of concurrent connections option in SQL Server
unlimited concurrent properties is configured as unlimited. The default is 25.
connections
Raise event if user Select Yes to raise an event if the percentage of user connections used
connection utilization compared to the maximum number of connections configured for the SQL Server
exceeds threshold? exceeds the threshold. The default is Yes.
Event severity when user Set the event severity level, from 1 to 40, to indicate the importance of an event in
connection utilization which the percentage of user connections used exceeds the threshold. The
exceeds threshold default is 5.
Threshold - Maximum Specify the maximum percentage of user connections that can be in use before
percentage of user an event is raised. The default is 95%.
connections utilized
Data Collection
Collect data for user Select Yes to collect data for the percentage of SQL Server user connections that
connections utilization? are currently in use for charts and reports. The default is unselected.
3.19 NearMaxLocks
Use this Knowledge Script to monitor the Locks utilization of SQL Server. This script compares the
used number of Locks to the maximum available Locks configured for the SQL Server. This script
raises an event if the percentage of Locks that are currently in use exceeds the threshold you set.
Monitors the used number of locks compared to the maximum available locks configured for the SQL
Server.
NOTE: To run this Knowledge Script, you need public and view server state SQL Server
permissions
If you have not configured the maximum number of Locks in the SQL Server then you cannot use this
script to collect data.
Resource Object
SQL Server instance
Default Schedule
The default interval for this script is Once every hour.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_NearMaxLocks job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Event Notification
Raise event if SQL Server Select Yes to raise an event if you have configured the Locks option in SQL
is configured for Server properties as unlimited. The default is Yes.
unlimited available
Locks?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event in
Server is configured for which the Locks option in SQL Server properties is configured as unlimited. The
unlimited available Locks default is 25.
Raise event if Locks Select Yes to raise an event if the percentage of locks that are currently in use
utilization exceeds exceeds the threshold. The default is Yes.
threshold?
Event severity when Locks Set the event severity level, from 1 to 40, to indicate the importance of an event in
utilization exceeds which the percentage of Locks exceeds the threshold. The default is 5.
threshold
Threshold - Maximum Specify the maximum percentage of locks that can be in use before an event is
percentage of Locks utilized raised. The default is 95%.
Data Collection
Collect data for Locks Select Yes to collect data for the percentage of locks that are currently in use for
utilization? charts and reports. The default is unselected.
3.20 RunSql
Use this Knowledge Script to run SQL statements or stored procedures. You can enter the SQL
Server statements to be executed when you run this script, or you can load the statements from a
script file and specify a full path to the file you want to use.
You can set maximum and minimum thresholds to be compared against the SQL Server statement’s
primary output value--either the number of rows returned, or the value found in the column you
specified. This script raises an event if the output value exceeds the maximum threshold or falls
below the minimum threshold you set.
When constructing a SQL statement for use with this script, include the database name in the syntax.
For example:
This script might encounter problems if you employ the USE command to qualify queries.
For example:
AppManager does not provide a syntax-checking mechanism. Syntax checking is performed by the
SQL Server on the monitored server when the job is run. If an error is detected, the SQL Server
passes an error to the Knowledge Script.
Resource Object
SQL Server instance
Default Schedule
The default interval for this script is Every 5 minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_RunSql job fails unexpectedly.
unexpectedly? The default is Yes.
Event severity when job fails Set the event severity level, from 1 to 40, to indicate the importance of an event
unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying
the User Name in the Knowledge Script,” on page 21.
Monitoring
Timeout Specify the number of seconds to wait while trying to establish a SQL connection
before terminating the attempt and raising a timeout exception. The default is 30
seconds.
Number of retries Specify the number of times the script should retry establishing a SQL
connection before terminating the attempt. The default is 0 (no retry attempts).
SQL query or command If you have selected the Parameter option in SQL query or command source,
statement enter a single-line statement here.
TIP: Unless you are entering very simple statements, you might find that typing
them into this field is error-prone. To avoid errors, you can copy and paste
statements, or use the Full path to SQL query or command file parameter.
Full path to SQL query or If you have selected the File option in SQL query or command source, enter
command file the complete file path.
For more information, see “Loading SQL Server Statements From a Script File”
on page 73.
You cannot use a UNC path if the NetIQ AppManager Client Resource Monitor
service is running as a system account.
Specify a description for the Specify a description for the SQL query that you want to display in the event
SQL query detail message. By default, the description is Detail result of query.
Save query results to a Select Yes to save the query results to a file. By default, query results are not
file? saved to a file.
Full path to results file If you are saving query results to a file, enter the complete file path and filename.
For example, F:\NetIQ Corporation\QueryResult, or
\\<computer>\<dir>\QueryResult.
You cannot use a UNC path if the NetIQ Corporation AppManager Client
Resource Monitor service is running as a system account.
Append to results file? Select Yes to append the results of the query to the existing contents of the
results file. If disabled, the results file is overwritten each time.
By default, the contents of the results file are appended each time a query or
command is run.
Number of rows to write to Specify the number of rows to write to the result file. The default is 10.
results file
Include query results in Select Yes to include the results of your query or command in the event detail
event details? message.
Number of rows to display in Specify the number of rows to display in the event detail message.
event details
The default is 10 rows.
NOTE: You can enter 0 to indicate all rows. However, the event detail message
has a 32-KB limit.
Include query results in Select Yes to include the results of your query in the data detail message.
data details?
By default, query results are included.
Number of results to display Specify the number of rows to display in the data detail message.
in data details
The default is 10 rows.
NOTE: Enter 0 to indicate all rows. However, the event detail message has a 32-
KB limit.
Event notification
Threshold type Select whether you want to perform threshold checking on one of the following:
Column number If the threshold is comparing values found by column number, indicate the
column number to use as the primary output value. The column you specify must
contain numeric data. A value of 0 returns the first column from the SQL
statements. Any other positive value returns the value for the first row of data
from the specified column. If the specified column is not a numeric field, an error
is raised and the Knowledge Script returns a -1 result. If you do not select by
column number, you can select by column name. The default is 0.
NOTE: You should execute your query in SQL Query Analyzer to ensure that the
proper rows and number of columns are returned. The leftmost column is
column zero. Also note that if a query is doing a “Select * ...“ and if the table
schema changes, the column numbering might change.
Named Column If the threshold is comparing values found by column name, indicate the column
name to use as the primary output value. The column you specify must contain
numeric data. The value for the first row of data in the specified column is
returned. If the specified column is not a numeric field, an error is raised and the
Knowledge Script fails.
Raise event if maximum Select Yes to raise an event when the T-SQL statements run by this script return
threshold is exceeded? more rows than the threshold, or if the value in the specified column exceeds the
threshold you set.
Event severity when Set the severity level, from 1 to 40, to indicate the importance of an event in
maximum threshold which the maximum threshold is exceeded.
exceeded
The default is 5.
Threshold -- Maximum Specify the maximum number of rows that can returned by the query or for the
value found in the column. If the number of rows exceeds the threshold value, an
event is raised. The default is 100.
Raise event if minimum Select Yes to raise an event when the T-SQL statements run by this script return
threshold is not met? fewer rows than the threshold, or if the value in the specified column falls below
the threshold value you set.
Event severity when Set the severity level, from 1 to 40, to indicate the importance of an event in
minimum threshold not met which the minimum threshold is not met.
The default is 5.
Threshold -- Minimum Specify the minimum number of rows that can be returned by the query or for the
value found in the column. If the number of rows falls below the threshold value,
an event is raised.
The default is 0.
Raise event for SQL Select Yes to raise an event when your query generates a Microsoft SQL Server
Server informational informational message.
messages?
The text of the message is returned in the event detail message. This option is
helpful when SQL Server returns the query result as an informational message
rather than as data. For example, when using the dbcc checktable command.
By default, this script does not raise an event under these conditions.
Event severity for SQL Set the severity level, from 1 to 40, to indicate the importance of an event in
Server informational which a SQL Server information message is generated.
messages
The default is 35.
Raise event if no rows are Select Yes to raise an event if no rows are returned.
returned?
The default is unselected.
Data Collection
Collect data for number of Select Yes to collect the number of rows returned by your query. If this
rows returned? parameter is set to Yes and the value returned is -1 or any negative number, an
error occurred while attempting to collect data.
Custom data stream legend Specify a custom legend for the data stream returned by this Knowledge Script.
3.21 ServerDown
Use this Knowledge Script to monitor the up or down status of SQL Server. If the SQL Server or agent
services are down, this script raises an event and optionally, attempts to start the services.
This script can also identify the downtime of the SQL Server since the server was started. This
information is returned in the event detail message.
Resource Object
SQL Server instance
NOTE: The ServiceDown Knowledge Script does not raise any event or collect data for agent service
for SQL Server Express Edition, because it does not monitor the agent service for SQL Server
Express edition.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_ServerDown job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly 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.
Restart SQL Server Select Yes to automatically restart SQL Server if it is detected down. The default
automatically if down? is Yes.
Event Notification
Raise event if service Select Yes to raise an event if a restart service fails or succeeds. The default is
restart fails or succeeds? Yes.
Event severity when service Set the event severity level, from 1 to 40, to indicate the importance of an event in
restart fails which the service is down and AppManager for Microsoft SQL Server cannot
restart it. The default is 5.
Event severity when service Set the event severity level, from 1 to 40, to indicate the importance of an event in
restart succeeds which the service is down and AppManager for Microsoft SQL Server
successfully restarted it. The default is 25.
Raise event if service Select Yes to raise an event if service down time exceeds the threshold you
down time exceeds specify. The default is unselected.
threshold?
Event severity when service Set the event severity level, from 1 to 40, to indicate the importance of an event in
down time exceeds which the service down time exceeds the threshold you set. The default is 5.
threshold
Threshold - Maximum Specify the maximum time in minutes that a service can be down before an event
service down time is raised. The default is 5 minutes.
Raise event if SQL Select Yes to raise an event if the SQL Server’s server or agent service is
Server’s server or agent disabled. The default is unselected.
service is disabled?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event in
Server’s server or agent which the SQL Server’s server or agent service is disabled. The default is 15.
service is disabled
Raise event if SQL Select Yes to raise an event if the SQL Server’s server or agent service does not
Server’s server or agent exist. The default is unselected.
service does not exist?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event in
Server’s server or agent which the SQL Server’s server or agent service does not exist. The default is 25.
service does not exist
Data Collection
Collect data for server Select Yes to collect data for the total number of hours the server was down for
downtime? charts and reports. If enabled, data collection returns the number of hours the
server has been down since it was started. The default is unselected.
3.22 SQLClusterOwner
Use this Knowledge Script to determine the node ownership of a SQL Server failover cluster
instance. This script raises an event if the cluster owner node is changed. In addition, this script
generates data streams for ownership status.
Resource Object
Microsoft SQL Server instance
Default Schedule
The default interval for this script is Every 5 minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_SQLClusterOwner job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL server fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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,” on page 21.
Event Notification
Raise event if owner node Select Yes to raise an event if the cluster owner is changed. The default is Yes.
is changed?
Event severity when owner Set the event severity level, from 1 to 40, to indicate the importance of an event in
node is changed which the cluster owner has changed. The default is 15.
Raise event to show the Select Yes to raise an event to display the cluster owner in the first iteration. The
owner node in first default is unselected.
iteration?
Event severity to show the Set the event severity level, from 1 to 40, to indicate the importance of an event to
owner node in first iteration display the cluster owner in the first iteration. The default is 25.
Raise event if job is not Select Yes to raise an event if the job is not applicable for the cluster. The default
applicable? is Yes.
Event severity when job is Set the event severity level, from 1 to 40, to indicate the importance of an event in
not applicable which the job is not applicable for the cluster. The default is 25.
Data Collection
Collect data for owner node Select Yes to collect cluster owner node status data for charts and reports. The
state? default is unselected.
3.23 TopResourceUsers
Use this Knowledge Script to monitor the total CPU time used by Microsoft SQL Server users, the
number of read and write operations performed by SQL Server users. This script also monitors the
total number of locks held by all SQL Server users, and the number of memory pages that can be
allocated to all SQL Server users. This script raises an event if the value exceeds the threshold you
set.
NOTE: To run this Knowledge Script, you need public and view server state SQL Server
permissions. If you do not have these permissions, the Knowledge Script does not display any error,
but the data returned is not complete. To get complete data, you must have these permissions.
Default Schedule
The default interval for this script is Every 5 minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_TopResourceUsers job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Applications to exclude Specify the names of the applications you want to exclude from monitoring.
Separate multiple names by commas (,) and no spaces. The default value is
SQLAgent.
If an application name literally matches the pattern you specify, then all the
applications that contains the specified name will be excluded.
For example, if you enter SQLAgent, and have applications, such as then
SQLAgent, SQLAgent - Job invocation engine, and SQLAgent - Generic
Refresher, then all these applications are not monitored.
Number of rows to display Specify the number of rows to display in the event or data detail message.
in event/data detail
The default is 100 rows. You can specify a maximum of 5000 rows.
NOTE: You can enter 0 to indicate all rows. However, the event detail message
has a 32-KB limit.
Include results in event Select Yes to include the results in the event detail message.
details?
By default, query results are included.
Include results in data Select Yes to include the results in the data detail message.
details?
By default, query results are not included.
Event Notification
Raise event if CPU time Select Yes to raise an event if CPU time exceeds threshold. By default, raising an
used exceeds threshold? event is enabled.
Include most expensive Select Yes to display the queries that consumed maximum CPU time and
queries based on CPU and elapsed time. The default is unselected.
elapsed time?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
maximum threshold which CPU time exceeds the threshold. The default severity level is 5.
exceeded
Threshold - Maximum CPU Specify the maximum amount of CPU time that can be used before an event is
time used raised. The default is 9999999 milliseconds.
Raise event if IO Select Yes to raise an event if the number of IO operations exceeds threshold. By
operations exceed default, raising an event is enabled.
threshold?
Include most expensive Select Yes to display the queries that performed highest IO operations. The
queries based on IO default is unselected.
operations?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
maximum threshold which the number of IO operations exceeds the threshold. The default severity
exceeded level is 5.
Threshold - Maximum Specify the maximum number of IO operations that can be used before an event
number of IO operations is raised. The default is 9999999 operations.
Raise event if number of Select Yes to raise an event if the number of locks held exceeds threshold. By
locks held exceeds default, raising an event is enabled.
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
maximum threshold which the number of locks held exceeds the threshold. The default severity level
exceeded is 5.
Threshold - Maximum user Specify the maximum number of user locks that can be held before an event is
locks raised. The default is 1000 locks.
Raise event if allocated Select Yes to raise an event if allocated memory exceeds threshold. By default,
memory exceeds raising an event is enabled.
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
maximum threshold which allocated memory exceeds the threshold. The default severity level is 5.
exceeded
Threshold - Maximum Specify the maximum amount of memory that can be allocated before an event is
memory allocated raised. The default is 15000 pages.
Data Collection
Collect data for CPU time Select Yes to collect data for charts and reports. If enabled, data collection
used? returns the total amount of CPU time used. By default, data collection is disabled.
Collect data for number of Select Yes to collect data for charts and reports. If enabled, data collection
IO operations? returns the number of read and write operations used by SQL Server users.
Collect data for number of Select Yes to collect data for charts and reports. If enabled, data collection
locks held? returns the total number of locks held by SQL Server users. By default, data
collection is disabled.
Collect data for number of Select Yes to collect data for charts and reports. If enabled, data collection
memory pages allocated? returns information about the total number of memory pages allocated to SQL
Server users. By default, data collection is disabled.
3.24 UserConnections
Use this Knowledge Script to monitor the total number of SQL Server user connections. This script
raises an event if the total number of SQL Server user connections exceeds the threshold you
specify.
NOTE: To run this Knowledge Script, you need public and view server state SQL Server
permissions. If you do not have these permissions, the Knowledge Script does not display any error,
but the data returned is not complete. To get complete data, you must have these permissions.
Resource Object
SQL Server instance
Default Schedule
The default interval for this script is Every 30 minutes.
General Settings
Raise event if job fails Select Yes to raise an event if the SQLServer_UserConnections job fails
unexpectedly? unexpectedly. The default is Yes.
Event severity when job Set the event severity level, from 1 to 40, to indicate the importance of an event
fails unexpectedly that is raised when the job fails unexpectedly. The default is 5.
Raise event if SQL Server Select Yes to raise an event if login to SQL Sever fails. The default is Yes.
login fails?
Event severity when SQL Set the event severity level, from 1 to 40, to indicate the importance of an event
Server login fails 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 Section 2.7.3, “Specifying the
User Name in the Knowledge Script,” on page 21.
Number of user Specify the number of user connections to display in the event detail message.
connections to include in Enter 0 to display all connections. The default is 20 user connections.
report
Include results in data Select Yes to include the results in the data detail message.
details?
By default, query results are not included.
Event Notification
Raise event if number of Select Yes to raise an event if the number of user connections exceeds the
connections exceeds threshold. The default is Yes
threshold?
Event severity when Set the event severity level, from 1 to 40, to indicate the importance of an event in
threshold exceeds which the number of user connections exceeds the threshold. The default is 5.
Threshold -- Maximum Specify the maximum number of user connections that are allowed before an
number of user connections event is raised. The default is 100 connections.
Data Collection
Collect data for total Select Yes to collect data for charts and reports. If enabled, data collection
number of user returns the total number of SQL Server user connections. The default is
connections? unselected.
All the scripts in the KSGs have their parameters set to recommended values. To run all of the
recommended scripts in a KSG at one time, click the RECOMMENDED tab, and then run the KSG on
a SQL Server resource.
The SQLServer KSGs enable a “best practices” usage for monitoring your SQL Server environment.
You can use these KSGs with AppManager monitoring policies. A monitoring policy lets you efficiently
and consistently monitor all the resources in your environment using a set of preconfigured
Knowledge Scripts. For more information, see “About Policy-Based Monitoring” in the AppManager
Help.
A KSG is composed of a subset of a module’s Knowledge Scripts. The script that belongs to a KSG is
a different copy of the original script you access from the SQLServer tab. If you modify a script that
belongs to a KSG, the parameter settings of the original script in the SQLServer tab are not affected.
In some cases, default script parameter settings are different when the script is deployed as part of a
KSG, as opposed to when it is deployed alone. The default settings of a script within a group depend
on its monitoring purpose within the larger group, and on the intended monitoring scope of that group.
If you modify or remove a script associated with the SQLServer KSG and want to restore it to its
original form, you can reinstall the AppManager For SQLServer module on the repository computer or
check in the appropriate script from the AppManager\qdb\kp\SQLServer directory.
The following Knowledge Scripts are members of the SQLServer recommended KSG to monitor SQL
Server:
Accessibility
BlockedProcesses
CacheHitRatio
Connectivity
DBLocks
DBStats
MonitorJobs
ServerDown
TopResourceUsers
UserConnections
This chapter describe how to troubleshoot AppManager for Microsoft SQL Server.
To avoid the above situation, you can enable dynamic logging for a job while the job is running.
IMPORTANT: The dynamic logging for a Knowledge Script is applicable only when the value of the
PRM_TraceLevel variable is Warn.
NOTE: You can add String key for each job for which dynamic logging need to be enabled. For
example, if you want to enable dynamic logging for three jobs only that have child IDs 50, 55,
and 62, create three separate String keys as 50, 55, and 62 respectively.
6 Double-click the String key that you have added in step 4 and specify the desired Logging level
(Off, Fatal, Error, Warn, Info, Debug, or All) in the Value data field.