InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.14: Administering database connections (overview) >
6.6.14.1: Administering database connections with the Java console >
6.6.14.1.1: Configuring new database connections with the Java administrative console
To configure JDBC providers and data sources, the resources necessary to
allow applications to connect to databases, click
Console -> Wizards -> Create Data Source from the console menu bar.
This leads to the Datasource task wizard.
Using the Datasource wizard
You use the Datasource wizard to define and configure connections to
a relational database that supplies a JDBC provider. Using the wizard sets some
properties pertaining to data sources. To set all values for all of the properties, use the
properties dialogs for data access.
Naming the data source
On the Specifying Datasource Resources panel:
- Name your data source.
It is recommended that within the name you identify the database to which the data
source will provide connections. For example, enter WASDatasource ,
where WAS is the name of the database. The name of the JNDI lookup
for such a data source would be jdbc/WASDatasource.
- Describe your data source.
- If required by your database, specify the name of the database being connected to.
The name is required for DB2, and sometimes required for Sybase, Merant, and Informix
(depending on your database configuration), and ignored for Oracle.
For example,
for DB2, you could enter WAS , and your data source would, as a result, point to
jdbc:db2:WAS. For Oracle, you would leave this field blank.
View data source property reference
- Click Next.
Selecting whether to use an existing or new JDBC provider
On the Specifying a JDBC Provider panel:
- If your data source will use a JDBC provider previously configured, select
the provider from the drop-down list for Use an existing JDBC provider.
Otherwise, opt to create a new JDBC provider.
- Click Next.
Creating a new JDBC provider
If you opted to create a new JDBC provider, you will see the Creating a JDBC
Provider panel:
- Name the provider. It is recommended that the name identify the database using the
JDBC provider. For example, enter
DB2JdbcDriver .
- Describe the provider.
- Select the Java class corresponding to the database being used. click
the ellipses to open a dialog in which you can select the implementation class or
enter an implementation class in the text field of the ellipses field.
View data access properties help
- Click Next.
Completing the data source
The Completing the Datasource Wizard panel lists the database and provider names, and
the implementation class.
If you do not want to change the values specified, click Finish. The
wizard will define a data source with the values you specified, and display
a message indicating whether the data source was successfully created. If the
wizard encounters an error, a message will display explaining why a data source
could not be defined.
To change the values specified, click Back to return to the appropriate
panel(s), make any needed changes, and then click Finish on this panel.
For many databases, additional properties
need to be added after the Datasource Wizard is completed, before the data source
can be used. For a list of the properties required for the data source for each
database type, see the Custom Properties field description in
the data source property reference.
|
|