Connectivity Guide > Connectivity Guide > Understanding JDBC Connectivity > JDBC Components > JDBC Information Utility--Load the JDBC Driver
Was this helpful?
JDBC Information Utility--Load the JDBC Driver
The JDBC Information Utility, JdbcInfo, loads the JDBC driver and displays its internal release information.
The class files for the JdbcInfo utility are located in the library directory (lib) of the Ingres instance. You must set your CLASSPATH environment (see Set CLASSPATH Environment) before using the JdbcInfo utility.
You can invoke the JdbcInfo utility from the command line with the following parameters:
java JdbcInfo
Displays the internal driver release of the JDBC Driver.
java JdbcInfo url
Attempts to establish a JDBC connection to the target database using the specified URL. For information on formatting the URL, see DriverManager.getConnection() Method--Establish JDBC Driver Connection. If successful, it displays the JDBC Driver name and release that serviced the URL connection.
java JdbcInfo host port
Attempts to establish a low-level connection to the Data Access Server associated with host port. If successful, it displays the internal driver release of the JDBC Driver.
The utility also supports ‑h (help) parameter to display the command line options.
Driver Archive Interface
Starting with driver version 4.3.0, the driver Java archive, iijdbc.jar, supports an executable interface with features similar to the JDBC Information Utility. The driver archive interface can be executed with either of the following command lines:
java –jar iijdbc.jar [options]
java com.ingres.jdbc.IngresMain [options]
The driver archive supports the same operations as JdbcInfo when executed with no arguments, a URL, or host/ port pair. In addition, the driver archive provides options for displaying driver configuration properties:
java com.ingres.jdbc.IngresMain –p
Outputs the driver configuration properties loaded by the driver.
java com.ingres.jdbc.IngresMain –P
Outputs system properties and the driver configuration properties loaded by the driver.
Note:  When executing the driver archive using the –jar java option, the normal CLASSPATH logical is not used. This results in the driver not being able to load the default driver property file. Be sure to execute the driver using the IngresMain class when using the property display options.
Set CLASSPATH Environment
Before using the JdbcInfo utility to load the JDBC driver, you must set the CLASSPATH Java environment variable to point to the class files for the driver.
To set your CLASSPATH environment
Issue the following command:
Windows:
set CLASSPATH = %II_SYSTEM%\ingres\lib\iijdbc.jar;.;%II_SYSTEM%\ingres\lib
UNIX (C shell):
setenv CLASSPATH  $II_SYSTEM\ingres\lib\iijdbc.jar:.:$II_SYSTEM\ingres\lib
VMS:
DEFINE CLASSPATH "/II_SYSTEM/ingres/lib/iijdbc.jar:/II_SYSTEM/ingres/library"
or
DEFINE JAVA$CLASSPATH II_SYSTEM:[ingres.library]iijdbc.jar,II_SYSTEM:[ingres.library]
Last modified date: 08/28/2024