When using the new Remote Execution feature in Oracle GoldenGate 12.3 for DB2 z/OS, you need to install a DB2 client on the remote server. This blog provides a step by step example of the configuration.
The example uses the DB2 client comes with the DB2 server, you can use other DB2 clients based on the license you have.
The example uses the DB2 client comes with the DB2 server, you can use other DB2 clients based on the license you have.
1. Download and unzip the DB2 Server Software
# cd /u01/source # tar -xf v10.5fp7_linuxx64_server_t.tar # ls db2 db2checkCOL_readme.txt db2checkCOL.tar.gz db2ckupgrade db2_deinstall db2_install
2. Install the DB2 Server
# ./db2_install DBI1324W Support of the db2_install command is deprecated. Default directory for installation of products - /opt/ibm/db2/V10.5 *********************************************************** Install into default directory (/opt/ibm/db2/V10.5) ? [yes/no] yes Specify one of the following keywords to install DB2 products. SERVER CONSV EXP CLIENT RTCL Enter "help" to redisplay product names. Enter "quit" to exit. *********************************************************** SERVER Do you want to install the DB2 pureScale Feature? [yes/no] no DB2 installation is being initialized. Total number of tasks to be performed: 49 Total estimated time for all tasks to be performed: 1947 second(s) Task #1 start Description: Checking license agreement acceptance Estimated time 1 second(s) Task #1 end Task #2 start Description: Base Client Support for installation with root privileges Estimated time 3 second(s) Task #2 end Task #3 start Description: Product Messages - English Estimated time 14 second(s) Task #3 end ... The execution completed successfully. For more information see the DB2 installation log at "/tmp/db2_install.log.77921".
3. Add the License
# cd /opt/ibm/db2/V10.5/adm # ./db2licm -l Product name: "DB2 Advanced Enterprise Server Edition" License type: "Trial" Expiry date: "05/06/2018" Product identifier: "db2aese" Version information: "10.5" # ./db2licm -a /u01/source/db2ese_c.lic LIC1402I License added successfully. LIC1426I This product is now licensed for use as outlined in your License Agreement. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT, LOCATED IN THE FOLLOWING DIRECTORY: "/opt/ibm/db2/V10.5/license/en_US.iso88591" # ./db2licm -l Product name: "DB2 Enterprise Server Edition" License type: "CPU Option" Expiry date: "Permanent" Product identifier: "db2ese" Version information: "10.5" Enforcement policy: "Soft Stop" Features: IBM DB2 BLU Acceleration In-Memory Offering: "Not licensed" IBM DB2 Performance Management Offering: "Not licensed" IBM DB2 Encryption Offering: "Not licensed" IBM DB2 Business Application Continuity Offering: "Not licensed"
4. Create the DB2 Client
# groupadd db2cltg1 # useradd -g db2cltg1 -d /home/db2clnt1 -m db2clnt1 # passwd db2clnt1 Changing password for user db2clnt1. == XXXXX # cd /opt/ibm/db2/V10.5/instance/ # ./db2icrt -u db2clnt1 db2clnt1 DBI1446I The db2icrt command is running. DB2 installation is being initialized. Total number of tasks to be performed: 4 Total estimated time for all tasks to be performed: 309 second(s) Task #1 start Description: Setting default global profile registry variables Estimated time 1 second(s) Task #1 end ... The execution completed successfully. For more information see the DB2 installation log at "/tmp/db2icrt.log.139947". DBI1070I Program db2icrt completed successfully.
5. Configure the DB2 Client
In this step, we "cataloging" the TCP/IP node and DB which will be needed by the Oracle GoldenGate extract and replicat in the SOURCEDB & TargetDB parameter files.
First, "su-ing" to the OS user that has access to the DB2 client libraries. You also need to include the ".../sqllib/lib64" and ".../sqllib/lib32" client libraries in your LD_LIBRARY_PATH environment variable and the "..../sqllib/bin" in the PATH environment variable.
In this step, we "cataloging" the TCP/IP node and DB which will be needed by the Oracle GoldenGate extract and replicat in the SOURCEDB & TargetDB parameter files.
First, "su-ing" to the OS user that has access to the DB2 client libraries. You also need to include the ".../sqllib/lib64" and ".../sqllib/lib32" client libraries in your LD_LIBRARY_PATH environment variable and the "..../sqllib/bin" in the PATH environment variable.
# su - db2clnt1
The following commands bind the remote ODBC packages needed in DB2 z/OS to allow remote connection from the LINUX server.
[db2clnt1]$ db2 catalog tcpip node PLEXU1 remote 147.11.0.12 server 7105 DB20000I The CATALOG TCPIP NODE command completed successfully. DB21056W Directory changes may not be effective until the directory cache is refreshed. [db2clnt1]$ db2 catalog db UB01 at node PLEXU1 DB20000I The CATALOG DATABASE command completed successfully. DB21056W Directory changes may not be effective until the directory cache is refreshed.
The key in the preceding step is the host name (147.11.0.12) and tcp port (7105) . Next, you should be able to login to DB2 z/OS from remote server with the z/OS user name and password as follows:
[db2clnt1]$ db2 connect to ub01 user ibmuser using passwd Database Connection Information Database server = DB2 z/OS 11.1.5 SQL authorization ID = IBMUSER Local database alias = UB01
Now, the DB2 client is ready to be used by Oracle GoldenGate.
Created: 12/1/2017, Last Updated: 1/3/2017, Thanks Kenal Wu and Mark Geisler for helping on this blog.