You can use the pages in the New Connection wizard to create
a connection profile, so that you can connect to a DB2® for z/OS® subsystem.
You can open the New Connection wizard from the Data Source Explorer
view and the Administration Explorer view.
Procedure
To create a connection to a DB2 for z/OS subsystem:
- Right-click in the Data Source Explorer, and select New from
the pop-up menu.
In the
Administration Explorer, you can click from
the Administration Explorer toolbar.
- On the first page of the wizard, select DB2 for z/OS as
the database manager, if you are connecting directly to the subsystem.
If you are connecting through a gateway, select DB2 for Linux, UNIX, and Windows as the database manager. Then, specify
other connection details, as described.
- Connection identification
- Name the new connection.
- Use default naming convention
- Specifies that the connection name is generated based on the name
of the subsystem that you are connecting to. This connection name
is displayed after you create the connection.
- Connection name
- Type a name for the connection. Available only if Use default
naming convention is not checked.
- JDBC driver
Specify a JDBC driver to use to connect to the subsystem. JDBC
drivers that appear in the list are fully supported. If a driver that
you want to use is not listed but it is supported by the database
manager, select Other Driver Default and provide
the details.
Click the ... button that
is next to the JDBC driver field to open a
window so that you can modify the path to the JAR files that are being
used for a particular JDBC driver. You can also use this window to
view the names and typical locations for JDBC JAR files for each listed
driver.
Global driver properties are set in the Preferences
window, on the Driver Definitions page. To open that page, select . Then, in the Preferences window, expand .
The IBM® Data
Server Driver for JDBC and SQLJ is included with the IBM Data Studio
client, and by default the wizard uses the included version of the
driver. It is recommended that you use this version, because it has
been tested thoroughly. If you want to use a different version of
this driver, you can modify the path to the required JAR files by
clicking the ... button. Other JDBC drivers
for IBM data servers might also
be included, depending on the workbench product that you are using.
JDBC
driver limitation: Some drivers require a pass code or license
file. Although license information can be set or available in the
current environment, the information might not be available in other
environments, such as on a Web server. The driver does not work if
the pass code or license is not available.
- Properties - General
- Database
- This field appears when DB2 for Linux, UNIX, and Windows is
the selected database manager because you are connecting to the subsystem
through a gateway. Specify the name of the subsystem.
- Location
- This field appears when DB2 for z/OS is the selected database manager.
Type the DB2 location name that
is defined during installation. You must enter the name in upper case.
To determine the location, host, and port that should be used for DB2 for z/OS connections, a DB2 for z/OS system
programmer or DBA can issue a <cmd prefix="">DIS
DDF where <cmd prefix=""> is a
preassigned character in your system for a particular DB2 subsystem.
- Host
- If you are connecting directly to the subsystem, specify the TCP/IP
host name or TCP/IP address of the subsystem.
- If you are connecting through a gateway, specify the TCP/IP host
name or TCP/IP address of the gateway.
- Port number
- If you are connecting directly to the subsystem, specify the TCP/IP
connection port for the selected subsystem.
- If you are connecting through a gateway, specify the TCP/IP connection
port for the gateway.
- Retrieve objects created by this user only
- This field appears when DB2 for z/OS is the selected database manager.
Select to load objects that were created by the user who is specified
in the User ID field.
- Default schema
- Type the name of the schema to use for unqualified database object
references in SQL statements. If you want SQL statements to refer
to database objects that are in other schemas, you must qualify the
names of the objects with the names of their corresponding schemas.
- Connection URL
- Shows the generated JDBC URL for the JDBC driver that you are
using. The URL identifies the database so that the driver can establish
a connection. The URL format depends on the driver.
- Properties - Optional
- Specify additional connection properties, for example: readOnly
= true. The properties that you can specify are different
for every JDBC driver. Refer to the JDBC driver documentation for
more examples.
- Optional: On the Filter page,
specify filtering options.
For best performance, you
should use filters when you are connecting to a large database.
If
you do not specify filtering options in the wizard, you can modify
them later by modifying connection properties or by specifying data
object filter options. (For information about these options, see "Data
object filters" at http://publib.boulder.ibm.com/infocenter/dstudio/v3r1/topic/com.ibm.datatools.server.ui.doc/topics/cfilters.html.)
To modify connection properties, right-click a connection and select Properties.
Filtering
is not enabled by default on the wizard page. To filter your connection,
clear the Disable filter check box, then specify
filtering options either by using an expression or by selecting specific
objects to include or not include in the connection view.
- Complete all other wizard steps and click Finish.
Results
The connection is displayed in the Data Source Explorer or
the Administration Explorer, depending on which view you started in.