Learn how to configure a data connection to IBM Db2 for IBM i, including replication options and manual installation of required Db2 packages.
Data Connection Configuration
To connect to IBM Db2 for IBMi, complete the following fields in your data connection setup:
| Field | Description |
|---|---|
| Name | Specifies the name of the data connection. This is a mandatory field. Example: DB2 IBMi DataConnection |
| Description | Describes the purpose of this data connection. Example: Connection to the DB2 IBMz database for financial reporting |
| Agent to access data | Select the agent from the dropdown that connects to the database. This agent securely accesses data from your network. |
| Host name | Specifies the host name (IP address or domain name) where the DB2 IBMz server is hosted. This is a mandatory field. Example: sqlserver.company.com |
| Port number | Enter the port number to access the database server. Default: 446. This is a mandatory field. Example: 5031 |
| Location |
|
| Enable IASP | To enable Independent Auxiliary Storage Pool (IASP), select Yes from the drop-down list. By default, No is selected. When enabled, enter the IASP name. |
| Advanced options | Available for cataloging purposes. |
Replication Options
IBM Db2 for IBM i supports two types of replication connections:
- Continuous data replication
- Mainframe data replication
Configure the following fields for replication:
| Field | Description |
|---|---|
| Replication Engine | Select the type of replication connection:
|
| Continuous Replication |
|
| Mainframe Replication | |
| Installation Library | Specify the library where the replication engine is installed. |
| Additional Runtime URL parameters | Available for replication pipeline purposes. |
Manual Installation of Db2 Packages
When a Db2 for i (Db2i) database is used for the first time by the Progress JDBC driver, the driver automatically creates all required Db2 packages in the NULLID collection (library), provided the user has BINDADD privilege. Manual intervention is not required in most cases.
If you need to explicitly create packages, follow these steps to download and install the packages:
-
Download the save files
Download the save files from: Progress iSeries Save Files
-
Create a library
CRTLIB MYLIB -
Create a save file in the library
CRTSAVF MYLIB/DDJV6R1 -
Transfer the save file
FTP the CfODBC DB2 SQL Package save file to the host system into the SAVEFILE you created in the previous step. Use binary mode for FTP. Select the file appropriate for your IBM i version:
V7R1: DDJV7R1.savf V6R1: DDJV6R1.savf V5R4: DDJV5R4.savf V5R3: DDJV5R3.savf V5R2: DDJV5R2.savf ftp> bin 200 Representation type is binary IMAGE. ftp> put DDJV6R1.savf /qsys.lib/mylib.lib/DDJV6R1.savf 200 PORT subcommand request successful. 150 Sending file to member DDJV6R1 in file DDJV6R1 in library MYLIB. 226 File transfer completed successfully. -
(Optional) Verify the save file transfer
Log in to your host system and execute the following command to display the packages and verify the transfer:
DSPSAVF MYLIB/DDJV6R1This command displays the saved objects:
Display Saved Objects Library saved . . . . . . . : NULLID Type Options press Enter. 5=Display Opt Object Type Attribute Owner Size (K) Data DDJC510A *SQLPKG PACKAGE NCDDTEK 96 YES DDJC510B *SQLPKG PACKAGE NCDDTEK 100 YES DDJN510A *SQLPKG PACKAGE NCDDTEK 96 YES DDJN510B *SQLPKG PACKAGE NCDDTEK 100 YES DDJR510A *SQLPKG PACKAGE NCDDTEK 96 YES DDJR510B *SQLPKG PACKAGE NCDDTEK 100 YES DDJS510A *SQLPKG PACKAGE NCDDTEK 96 YES DDJS510B *SQLPKG PACKAGE NCDDTEK 100 YES DDJU510A *SQLPKG PACKAGE NCDDTEK 96 YES DDJU510B *SQLPKG PACKAGE NCDDTEK 100 YES -
If necessary, create the NULLID library
CRTLIB NULLID -
Restore objects into the NULLID collection
RSTOBJ OBJ(*ALL) SAVLIB(NULLID) DEV(*SAVF) SAVF(MYLIB/DDJV6R1) -
Grant privileges to the PUBLIC group for all packages
GRANT EXECUTE ON PACKAGE NULLID.DDJR510A TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJR510B TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJS510A TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJS510B TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJU510A TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJU510B TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJC510A TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJC510B TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJN510A TO PUBLIC GRANT EXECUTE ON PACKAGE NULLID.DDJN510B TO PUBLIC