Configuring SQL Query performance monitors
- Last Updated: July 8, 2022
- 3 minute read
The SQL Query performance monitor allows you to check for certain conditions in a Microsoft SQL, MySQL, or ORACLE database, based on a database query.
Important: To use the SQL Query monitor to monitor a MySQL database, you must first download and install the MySQL .NET connector on the machine. Note that only MySQL version 5.2.5 .NET Connector is supported due to compatibility issues. The connector is located on the website (http://www.whatsupgold.com/MySQL525Connector). This link downloads the
mysql-connector-net-5.2.5.zip file. After the file downloads, extract the MySQL.Data.msi and run the MySQL Connector setup utility by double-clicking on the MySQL.Data.msi icon. On the Choose Setup Type dialog, select Typical, then click Install. The MySQL .NET Connector is installed in the following location: C:\Program Files\MySQL\MySQL Connector Net 5.2.5\. After the .NET Connector has been installed, restart the machine.Important: The SQL Query monitor supports Windows and ADO authentication. Make sure that credentials are setup in the Credentials Library for the database you want to query. The Credentials system stores Windows and ADO database credential information in your database to be used when a database connection is required. For more information, See Using Credentials.
Important: When connecting to a remote SQL instance, only supports the TCP/IP network library.
The SQL Query performance monitor is available in Premium Edition. To update your license, visit the Customer Portal.
The SQL Query performance monitor requires one or more of the following credentials:
- ADO
- Windows
Configure the SQL Query performance monitor using the following boxes:
- Name. Enter a unique name for the performance monitor. This name displays in the Monitor Library.
- Description. (Optional) Enter a short description for the performance monitor. This description displays next to the performance monitor in the Monitor Library.
- Enter or select the appropriate information for the Server Properties section:
- Server Type. Select Microsoft SQL Server or ORACLE as the database server type.
Note: MySQL database is supported and listed as a server type option only if the MySQL 5.2.5 Connector is installed.
- Connection Timeout (sec). Used by the SQL Query monitor to determine how long to wait for the server to respond before terminating the connection and returning the timeout error. Minimum allowed value is one (1) second whereas maximum allowed value is 120. The default value is 15 seconds.
Note: The connection timeout setting configured by the user is used for polling only; the query builder does not use it. Instead, the query builder assumes a default of 15 seconds for the connection timeout.
- Server Address.
ServerName\Instanceformat for Microsoft SQL Server (for example, WUGServer\SQLEXPRESS), ServerName for MySQL (for example, WUGServer), orServerName/ServiceNamefor Oracle (for example, WUGServer/Oracle).
Note: When using an Oracle server type, the SQL query monitor does not make use of the
tsnnames.ora file on the client (i.e. system.- Port (Optional). The database server port number if other than the standard database port number.
- SQL Query to Run. A query you want to run against a database to monitor and check for certain database conditions. Only select queries are allowed.
Important: Make sure that you include the full database name in your query. For query help, click Build. The SQL Query Builder will assist you in developing proper query syntax.
Important: The SQL query you enter must return a single numeric value. Specifically, a single record that has just one column. If the query returns more than one record, the monitor will fail to store the data. If the query returns a single record, but there are multiple columns in the record returned, then the monitor will pick the first column as the value to store and this first column has to be numeric, otherwise, the monitor will fail to store the data.
- Build. Click to open the SQL Query Builder dialog for assistance building queries.
- Verify. Click to check that the query is valid. If there is a syntax error with the SQL query, a message appears with tips about the syntax issue.