Setting JDBC preferences
You can use the Preferences window to set up the JDBC driver information.
About this task
QMF administrators are responsible for distributing the JDBC driver information that users will need in order to access any data source. In most cases, administrators distribute this information by deploying a preconfigured JDBC library settings file when the application interface that you are using is installed.
Advanced users can define or change JDBC driver location information using the JDBC Libraries page of the Preferences window to specify the JDBC driver information for each type of database (such as Db2®, MySQL, Oracle) that will be accessed. The JDBC driver locations must be accessible to QMF. QMF will retain the JDBC driver information. You would only repeat this specification process to add new drivers or make changes to the properties of an existing driver.
To define JDBC driver information:
- Select Preferences window. Select JDBC Libraries. The JDBC Libraries page opens. All of the JDBC driver libraries that you have already set up are listed in the JDBC driver libraries area. The JAR files associated with selected driver library are listed in the Driver files area. Additional information about the selected driver library is displayed on the Details panel. to open the
- To add new JDBC driver, select Add Driver. The Add New Driver Library window opens.
- The JDBC driver information for each type of database is organized by libraries. Enter a name for the library in the Enter new library name field. It is recommended that the name that you specify describes the JDBC information that will be included in the library. For example, if you are adding JDBC driver information for accessing Db2 databases, you might call the library Db2. However, this is a descriptive field and can include any text.
- Specify the actual name of the driver class that will be used in the Driver class name field. This can be found in your JDBC driver documentation. For example: com.ibm.db2.jcc.DB2Driver.
- Optional: Specify a generic example of a correctly formatted URL that could be used to connect to the database in the URL templates field. For example, if you are adding JDBC driver information for accessing Db2 databases, you might specify the following JDBC URL template: jdbc:db2://host:50000/database. The generic information as specified in the template is presented when you are adding data sources to the repository and when you are creating repository connections. You will replace the generic information with the specific database information.
- Click OK to create the driver library and close the Add New Driver Library window.
- If you are using QMF for Workstation, add the location information for the JDBC driver files to the library.If you are using QMF for Workstation, click Add Driver Files. The Add Files to [libraryname] window opens. Search for and select the JDBC driver files that you want to add. Click Open. The location of the JDBC driver files is saved in the JDBC library that you have selected.
- You can make the following changes to the JDBC driver information:
- To edit the JDBC driver library information, select an existing JDBC driver library from the list and click Edit Driver. The Edit Driver Library window opens where you can make changes to the Library name, Driver class name, and JDBC URL template fields.
- If you are using QMF for Workstation, to edit the name and location of the files that contain the JDBC drivers, select a file from the list of files that have been added to the JDBC library, and click Edit.
- To remove a JDBC driver library, select an existing JDBC driver library from the list and click Remove Driver. The library, including all the JAR files that it contains, is removed.
- If you are using QMF for Workstation, to remove a JAR file from a JDBC driver library, select an existing file from the list and click Remove.To remove a JAR file from a JDBC driver library, select an existing file from the list and click Remove Driver File. The file is removed.
- Click Apply and Close. The JDBC library information is saved. The Preferences window closes. You must repeat this process for each type of JDBC driver that will be used to access various database data sources such as Informix® or SQL Server.