Knowledge Base

Loading Custom JDBC Drivers in Monitoring Studio

KB1257 - Sep 11, 2019

Type: Best Practice

Description: This article explains how to load new JDBC drivers for use with the various SQL monitors, should the included drivers not be suitable.

Additional Keywords: JDBC, SQL, Monitoring Studio

Related Topics

Introduction

When attempting to configure a Database Query in Monitoring Studio, you may encounter compatibility issues between the included JDBC drivers and the version of your database system.

For example, when attempting to query a MySQL 8 Database, you may receive an error such as "SQL Exception: Unknown system variable 'query_cache_size'". This is due to the JDBC driver in use being incompatible with MySQL 8. Due to this, it is necessary to load a new JDBC driver manually.

Procedure

Please refer to your database software vendor's documentation for the current version of JDBC drivers and installation instructions.

Once they have been installed on the PATROL Agent system, you can then configure Monitoring Studio to use them.

TrueSight Configuration

  1. Within the Infrastructure policy's monitoring configuration, add an Advanced Variable.

    Monitoring Configuration

  2. Specify the Variable as collectionHubAdditionalArgs.

  3. Specify the Value as the path to the JDBC jar file, prepended by -Xbootclasspath/p: For Example: -Xbootclasspath/p:"C:\jdbc\mysql-connector-java-5.1.44.jar".

    Advanced Variables

  4. Save your changes to the policy.

    Note: A restart of the PATROL agent is required for the settings to take effect.

PATROL Configuration

  1. Right-click the Monitoring Studio icon.
  2. Select Knowledge Module Commands > KM Commands > Java Settings.

    KM Menu

  3. Within Java Settings, select Advanced Settings.

  4. In the Command line options field, specify the path to the JDBC jar file, prepended by -Xbootclasspath/p: For Example: -Xbootclasspath/p:"C:\jdbc\mysql-connector-java-5.1.44.jar."

    Advanced Java Settings

  5. Click Accept, and click OK in the Java Settings window.