6 Installing with DB2 LUW Databases

This chapter describes the requirements and how to install Oracle GoldenGate with a DB2 LUW database.

Topics:

6.1 Disk Requirements for DB2 LUW

Assign the following free disk space:

  • To determine the size of the Oracle GoldenGate download file, view the Size column before downloading your selected build from Oracle Software Delivery Cloud. The value shown is the size of the files in compressed form. The size of the expanded Oracle GoldenGate installation directory will be significantly larger on disk.

  • Allow at least an additional 1 GB of disk space on any system that hosts Oracle GoldenGate trails, which are files that contain the working data. You may need more or less than this amount, because the space that is consumed by the trails depends on the volume of data that will be processed. See the guidelines for sizing trails in Administering Oracle GoldenGate.

  • By default, Oracle GoldenGate maintains data that it swaps to disk in the dirtmp sub-directory of the Oracle GoldenGate installation directory. The cache manager assumes that all of the free space on the file system is available. This directory can fill up quickly if there is a large transaction volume with large transaction sizes. To prevent I/O contention and possible disk-related Extract failures, dedicate a disk to this directory. You can assign a name and size to this directory with the CACHEDIRECTORY option of the CACHEMGR parameter. The CACHESIZE option of CACHEMGR sets a soft limit for the amount of virtual memory (cache size) that is available for caching transaction data. See Reference for Oracle GoldenGate for the default values of these options and detailed explanations, in case system adjustments need to be made.

6.2 Database Configuration for DB2 LUW

  • The Oracle GoldenGate Extract process calls the DB2READLOG function in the Administrative API to read the transaction log files of a DB2 LUW source database. In addition to DB2READLOG, Extract uses a small number of other API routines to check the source database configuration on startup.

  • The Oracle GoldenGate Replicat process uses the DB2 CLI interface on a DB2 LUW target database. For instructions on installing this interface, see the DB2 documentation.

  • The database can reside on a different server from the one where Oracle GoldenGate is installed, so long as the database is defined locally. For example, the following enables you to use database mydb locally with data that is on abc123:

    catalog tcpip node abc123 remote abc123.us.mycompany.com server 00000catalog db mydb as abc123 at node abc123 AUTHENTICATION server
    
  • The DB2 Universal Database has an internal trace facility called db2trc, which acquires Interprocess Communication resources (IPC) (both semaphore and shared memory). Even though a DB2 trace is not turned on, it may issue semget() calls to the operating system. These calls fail since no IPC resources are acquired so you must issue the following command on the DB2 client:

    db2trc alloc 
    
  • For best performance for DB2 clients with a local database, Oracle recommends that you create a local node catalog instead of TCP/IP when connecting Oracle GoldenGate to a database that resides on the same machine. This is because local node uses IPC, which is much faster than a TCP/IP node that uses a socket API to access the local database.

6.3 Database User for Oracle GoldenGate Processes for DB2 LUW

  • Create a database user that is dedicated to Oracle GoldenGate. It can be the same user for all of the Oracle GoldenGate processes that must connect to a database:

    • Extract (source database)

    • Replicat (target database)

    • DEFGEN (source or target database)

  • To preserve the security of your data, and to monitor Oracle GoldenGate processing accurately, do not permit other users, applications, or processes to log on as, or operate as, the Oracle GoldenGate database user. It is recommended that you store the login credentials in an Oracle GoldenGate credential store. The credential store makes use of local secure storage for the login names and passwords, and permits you to specify only an alias in the Oracle GoldenGate parameter files. For more information about this option, as well as alternative security options, see Administering Oracle GoldenGate.

  • Assign system administrator (SYSADM) or database administrator (DBADM) authority to the database user under which Extract runs. To give the Extract user DBADM authority, a user with SYSADM authority can issue the following grant statement.

    GRANT DBADM ON DATABASE TO USER user
    

    This authority can also be granted from the User and Group Objects folder in the DB2 Control Center. The database tab for the user that is assigned to an Oracle GoldenGate process should have the Database Administrative Authority box checked.

    Note:

    If the Extract user does not have the required authority, Extract will log the following errors and stop.

    [SC=-1224:SQL1224N A database agent could not be started to 
    service a request, or was terminated as a result of a database 
    system shutdown or a force command. 
    SQL STATE 55032: The CONNECT statement is invalid, because the 
    database manager was stopped after this application was started]
    
  • Grant at least the following privileges to the database user under which Replicat runs:

    • Local CONNECT to the target database

    • SELECT on the system catalog views

    • SELECT, INSERT, UPDATE, and DELETE on the target tables

6.4 Choosing an Installation System for DB2 LUW

To install Oracle GoldenGate for DB2 LUW, you can use either of the following configurations:

To Use Remote Delivery to the DB2 LUW System Using DB2Connect

  1. For the intermediary system, select any supported for the DB2 for LUW database to be the system that Oracle GoldenGate is installed on.
  2. Install and run DB2 for LUW on the selected remote system so that the Replicat process can use the supplied DB2 Connect driver.
  3. Catalog the DB2 target node in the DB2 for LUW database on the remote system by using the following DB2 command:
    catalog tcpip node db2_node_name remote DNS_name
    
    server DB2_port-number
    
  4. Add the target DB2 database to the DB2 for LUW catalog on the intermediary system by using the following DB2 command:
    catalog db database_name as database_alias at node db_node_name 
    

    Note:

    Refer to the IBM DB2 LUW documentation for more information about these commands.

  5. Install Oracle GoldenGate, see Installing on all Platforms.
  6. Specify the DB2 target database name with the Replicat parameter TARGETDB when you configure the Oracle GoldenGate processes.

6.5 Choosing and Configuring a System for Remote Capture or Delivery

In a remote installation, you install Oracle GoldenGate on a server that is remote from the source or target database server. This server can be any Linux, UNIX, or Windows platform that Oracle GoldenGate supports for the DB2 for LUW database. The Oracle GoldenGate build must match the version of DB2 LUW that is running on the installation server.

In this configuration, the location of the database is transparent to Extract and Replicat. Extract can read the DB2 logs on a source DB2 LUW database server, and Replicat can apply data to a target DB2 LUW server.

To Configure Remote Capture or Delivery:

  1. Install and run DB2 for LUW on the remote server that has DB2 Connect.
  2. Catalog the remote server in the DB2 source or target database by using the following DB2 command.
    catalog tcpip node db2_node_name remote remote_DNS_name
    
  3. Catalog the DB2 target node in the DB2 for LUW database on the remote server by using the following DB2 command:
    catalog tcpip node db2_node_name remote remote_DNS_name 
    server remote_port_number
     
    
  4. Add the DB2 source or target database to the DB2 catalog on the remote server by using the following DB2 command:
    catalog db database_name as database_alias at node db_node_name
     
    

    Note:

    Refer to the IBM DB2 LUW documentation for more information about these commands.

  5. Download and install the Oracle GoldenGate build that is appropriate for the DB2 LUW database on the remote server.