If you are using JDBC to connect to the database
repositories and data sources, you must specify where QMF will
find the JDBC driver files for each type of database that will host
a repository or be accessed as a data source.
Before you begin
Open the Administrator perspective
if you have not already done so. To open the Administrative perspective
go to the menu pane and select .
The JDBC driver files that are required to connect
to a specific database must be installed on or accessible to the machine
that you are currently using to configure repositories and data sources. QMF does
not ship with these drivers.
About this task
The procedure in this task describes how to add the required
JDBC driver files to your QMF environment
configuration.
Note: The multiplatform version
of QMF for Workstation includes
the JDBC driver that can be used to connect to Db2® UDB for Linux®, UNIX and Windows data sources. If you are using the
multiplatform version of QMF for Workstation,
you do not have to perform the set up process for this driver.
To specify the JDBC driver information for each type
of database that will host a repository or be accessed as a data source,
perform the following procedure:
Procedure
-
Click to open the 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.
- If a JDBC driver is not listed in the pre-populated libraries,
you can add a user defined JDBC driver library and driver class name:
- Select Add Driver. The Add
New Driver Library window opens.
-
The JDBC driver information is organized by libraries. Enter a name for the driver
library in the Enter new library name field. It is recommended
that the name that you specify describes the JDBC driver that will be included in the
library. For example, if you are adding information for a DB2® Type 2 UDB driver, you might call the library Db2 Type 2 UDB driver. 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, for a Db2
Type 2 UDB driver you might specify:
com.ibm.db2.jdbc.app.Db2Driver
.
-
Optionally, you can specify a generic example of a correctly formatted URL that
could be used to connect to the database in the URL templates
field. To add a URL template, select the Add URL template icon.
The text New template displays in the
Template field. Replace the text New
template with a sample of how the URL should be formatted. For example,
if you are adding JDBC driver information for Db2 Type 2 UDB driver, 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.
- Optionally, you can add additional JDBC driver properties
to the URL template. Click JDBC driver properties.
The Advanced JDBC Settings window opens. Select
the properties that will be supported or can be used when connecting
to a database using JDBC. They will be reflected in the URL template.
-
Click OK to create the driver library and close the Add New
Driver Library window.
-
For each driver library, both pre-populated and user defined, you must specify where to
find the associated JDBC driver JAR files. To specify where to find the associated JAR files,
complete the following steps:
-
Click the library to which you want to add JAR file location information.
-
Click Add Driver Files. The Add JARS 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 JAR files is saved in
the JDBC library that you have selected.
- Select Apply. The JDBC library information
that you have specified is saved in the
.bi.jdbc.drivers
file
for the current machine. You must repeat the previous step for each
pre-populated and user defined driver that will be used to access
various database repositories or data sources.
- You can make the following changes to the JDBC
driver information:
- To edit user defined 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 Edit library
name, Driver class name, and URL templates
fields.
- If you are using QMF for Workstation, to edit the location of the JAR files,
select a JAR file from the list of files that have been added to the JDBC library, and click
Edit. The Edit JAR URL window opens.
Specify the name and location in the Edit JAR location field.
- 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. You can not remove any pre-populated libraries.
- If you are using QMF for Workstation, to remove a JAR file from a JDBC driver
library, select an existing JAR file from the list and click Remove. The JAR
file is removed.
- Click OK. The Preferences window
closes.
Results
The JDBC driver information is saved and QMF can
connect to your database.
Note: The information that you entered
in the wizard is written to a file named .bi.jdbc.drivers
.
This file is saved in the personal settings directory of the machine/server
that you are using to configure QMF repositories.
What to do next
Now you are ready to create the shared
repository storage tables on your database.
Note: For more information on configuring JDBC libraries,
refer to the Creating and Connecting to a repository cheat
sheet. This cheat sheet details how to configure JDBC libraries and
describes how you can copy the JDBC settings file for distribution
across multiple systems. The cheat sheet is accessible from the QMF for Workstation Help menu.
To open the cheat sheet, select . Select Creating
and connecting to a repository from the Cheat
Sheet window.