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
IBMi System Restore Configuration for SQLPKG
This topic describes the required system values and restore parameters to be used when restoring save files containing *SQLPKG objects on the same IBM i system and the same OS release, including temporary changes and post-restore rollback steps.
-
System Value: QALWOBJRST
- Initial Value: QALWOBJRST = *ALWPTF This is the default and secure system setting.
-
Required Value for NULLID Restoration:
For restoring objects associated with
NULLID, the system value must temporarily
allow all object restores.
CHGSYSVAL SYSVAL(QALWOBJRST) VALUE(*ALL)Important: This change is required only during the restore operation. -
Post-Restore Action: After the restore is
complete and the new connection is created, revert the system
value back to its original setting:
CHGSYSVAL SYSVAL(QALWOBJRST) VALUE(*ALWPTF)
-
Restore Parameter: QFRCCVNRST (Force Conversion on Restore)
-
Allowed Values:
- *NO
- *YES
- Recommended Value (Same System / Same Release): QFRCCVNRST(*NO)
- Rationale: When restoring on the same IBM i system and the same OS release, no object format conversion is required. *SQLPKG objects are already compatible with the target environment. Using *YES will not cause a failure, but it is unnecessary and adds extra processing.
-
Allowed Values:
-
Restore Parameter: QVFYOBJRST (Verify Object on Restore)
- Recommended Value: QVFYOBJRST(*NONE)
-
Rationale for *SQLPKG:
- *SQLPKG objects are not digitally signed.
- They do not behave like program objects such as *PGM or *SRVPGM.
- Signature verification provides no benefit for SQL packages.
- Disabling verification avoids unnecessary checks and improves restore efficiency.
-
Recommended Restore Parameter Summary
Parameter Value Reason QALWOBJRST *ALL (temporary) Required for NULLID restoration QFRCCVNRST *NO No conversion needed on same system QVFYOBJRST *NONE SQL packages are not signed QSAVACCPTH *NO (recommended) Access paths rebuilt if required