IBM provides a broad variety of platforms on which DB2 deployed; one of the most prominent is the AS400/iSeries. JDBC connectivity to DB2 on the AS400 is achieved in much the same way as is connectivity to other DB2 deployments - via a JDBC driver. Among the drivers that can be used are the JCC Universal Driver and the JTOpen "Toolbox" JDBC driver. In this article, we describe setup for the JTOpen Toolbox driver.
Setting up a QuerySurge Connection with the JTOpen Toolbox Driver
A QuerySurge DB2/AS400 Connection is set up using the Connection Extensibility feature of the QuerySurge Connection Wizard.
- Download the JTOpen toolbox. The main JTOpen URL is here; the download page is here.
- Deploy the JTOpen JDBC driver jar to your Agent(s). JTOpen contains a number of tools in addition to the JDBC driver; you only need to deploy the JDBC Toolbox driver jar (jt400.jar). The procedure for deploying a new driver to a QuerySurge Agent is here (for Agents on Windows) and here (for Agents on Linux).
- Log into QuerySurge as a QuerySurge Admin user, and navigate to the Admin view. Steps for using the Connection Extensibility feature can be found here. To use the Connection Extensibility option in the Connection Wizard with the JTOpen Toolbox driver, you'll need the following information:
Connection URL template:
The JTOpen driver supports a broad range of URL connection properties that you can see here. It is especially important to use the
prompt=falseproperty with the QuerySurge Agent. Check with a DBA or other knowledgeable resource about what additional properties should be used on the URL.
Sample Connection URL:
Note: The JTOpen driver, if the authentication credentials provided are invalid, prompts for valid credentials. If the prompt does not display, the QuerySurge Agent running the query will hang. Setting the connection property
prompt=falsedisables the prompt, and leads to an exception message in the Agent log instead of a hung Agent.
When you've entered your Connection information, the Connection Wizard will look like:
- If you have a Test Query, feel free to enter it in order to verify that your Connection parameters are correct. It should be a standard query that returns a small amount of information - one row is enough. You can use the Test Connection button if you've entered a Test Query:
Note: The JTOpen Toolbox driver is open-source software that may or may not be maintained for future releases.
- Once you have the information entered and (optionally) verified, click the Save button to save the Connection. You're ready to use the Connection in a QueryPair.