SQL Query (Performance)
- Last Updated: June 21, 2023
- 2 minute read
- WhatsUp Gold
The SQL Query monitor uses Windows or ADO authentication to determine if specific conditions exist in a Microsoft SQL, MySQL, or ORACLE database by querying the database.
Important: To monitor a MySQL database, download and install the MySQL .NET Connector on the WhatsUp Gold machine. Please note, the latest version of WhatsUp Gold only supports MySQL .NET Connector version 8.0.21 due to potential compatibility issues. If you are using application monitoring features and/or SQL Query active or performance monitors, you must download and upgrade your connector from version 5.2.5 to 8.0.21. The MySQL .NET Connector can be downloaded here: https://downloads.mysql.com/archives/c-net/.
Note: When connecting to a remote SQL instance, WhatsUp Gold only supports the TCP/IP network library.
Provide a unique name and description for the monitor, then configure the following:
- Server type. Select Microsoft SQL Server, MySQL, or ORACLE as the database server type. Please note, MySQL database is supported and listed as a server type option only if the MySQL 5.2.5 Connector is installed.
- Timeout. Enter the amount of time WhatsUp Gold waits for the server to respond before terminating the connection and returning the timeout error. The minimum allowed value is 1 second whereas maximum allowed value is 120. Please note, this setting only applies to polling whereas the query builder assumes a default of 15 seconds for the connection timeout.
- Server address. Enter the server address in the applicable format:
- ServerName\Instance format for Microsoft SQL Server. Example: WUGServer\SQLEXPRESS
- ServerName for MySQL. Example: WUGServer
- ServerName/ServiceName for Oracle. Example: WUGServer/Oracle.
- Port. Enter the database server port number.
- SQL Query to run. Enter the query to run against the specified database to check for certain database conditions. .
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 fails 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.
Click Verify to test if the entered database query is valid.