Adding an instance of the CDC Replication Engine for Db2 Database (Windows)

Before you can start replication, you must add and configure an instance.

Before you begin

For a remote database configuration, if you want CDC Replication to serve as the source and target with fastload apply, you must catalog the remote Db2 database. Otherwise, CDC Replication can only serve as a target with JDBC apply.

Procedure

  1. If you are configuring the first instance of the CDC Replication Engine for Db2® Database after installation, you can proceed to Step 3 of this procedure.
  2. At the command prompt, launch the configuration tool by issuing the following command in the specified directory:
    \<CDC Replication installation directory>\bin\dmconfigurets.exe
  3. At the welcome message, click OK to continue.
  4. On the IBM® Data Replication New Instance dialog box, you can configure the following options in the Instance area:
    Option Description
    Name Enter a name for your CDC Replication instance. This name must be unique.
    Server Port Enter the port number which CDC Replication uses for communication with client workstations running Management Console and other servers.
    Note: This port number cannot be used by other applications installed on the same server. You will use this port number when specifying access parameters for your datastore in the Access Manager perspective in Management Console. CDC Replication displays a default TCP/IP port of 10901. For more information, see your Management Console documentation.
    Staging Store Disk Quota (GB) Enter the maximum amount of disk space that will be utilized by the CDC Replication staging store on your source system. The default value is 100 GB.

    Specify 1 GB if you are creating an instance that will be used as a target of replication. This reduces the disk resources that CDC Replication requires on your target system.

    Maximum Memory Allowed (MB) Enter the amount of physically available RAM that you want to allocate for this instance of CDC Replication. By default, the configuration tool allocates 1024 MB of RAM for each instance.
    Note: Using values other than the defaults or allocating more RAM than is physically available on your server should only be undertaken after considering the impacts on product performance.
    Encryption profile Select the encryption profile from the list. If you would like to enable TLS for communication between source and target, you must select an encryption profile with encryption enabled. Click Manage to view and manage the available encryption profiles. Encryption profiles can be shared between multiple instances of CDC Replication.
  5. In the Windows Service area, you can specify the account that will be used to start CDC Replication services. Select one of the following options:
    Option Description
    Local System account Start the CDC Replication services through the local system administrator account.
    This account Start CDC Replication services through the specified user account.

    The account must be specified in the format <domain>\<user name>, where <domain> is the name of a domain in your environment, and <user name> is a valid login user name in the specified domain. If your computer is not part of a domain, you can specify <computer name>\<user name>.

    In the Password and Confirm Password boxes, enter the password currently associated with the selected Windows user account. If you change the password for the Windows user account after installing CDC Replication, you will have to use the Windows Services dialog to change the password currently set for each CDC Replication service.

  6. In the Database area, you can configure access to the database that contains the tables for replication. To complete this step, you will require system administrator privileges. You can then add a datastore in the Access Manager perspective in Management Console and provide users access to this database. For more information, see your Management Console documentation.
    • To use the default JDBC type 2 connection, fill out these fields:
      Option Description
      Db2 Instance Enter the name of the Db2 instance that you want to replicate data to or from and contains all of the tables for replication.
      Note: For API (IAM) key authentication, please provide the remote Db2 instance name. Cataloging is not required.
      Name Enter the name of the database that you want to replicate data to or from and contains all of the tables for replication. This is the database that you configured as part of the preinstallation tasks.
      Note: You cannot select a Db2 system database.
      Note: Do not click the Advanced button and enter values unless directed by an IBM representative.
      External secret store with Java user exit
      1. To use an external secret through Java user exit authentication, select the Would you like to retrieve database login credentials from an external secret store Java User Exit? option. You are prompted to enter the Java class name of the external secret store user exit, for example com.datamirror.ts.external.keystore.VaultExternalSecretStoreTest.
      2. Enter the case-sensitive database user key from the external secret store for the specified database and the case-sensitive database password key from the external secret store for the specified database.

      For more information, see Creating an instance by using database credentials stored in an external secret store.

      User name Enter the user name for the specified database.
      Password Enter the password for the specified database.
      Metadata Schema Select the database schema used by CDC Replication for metadata tables. You can specify any schema except those in use by other installed instances of CDC Replication for the given database.
      Note: CDC Replication metadata tables contain important configuration information and should be backed up as part of your database backup strategy.
    • To specify a JDBC type 4 connection, select the Do you wish to establish a JDBC type 4 connection to the database check box and fill out these fields:
      Option Description
      Db2 Instance Enter the name of the Db2 instance that you want to replicate data to or from. For a remote configuration where the database is not cataloged, select a Db2 instance on the local system (client).
      Host Provide the host name (with fully qualified domain name) or IP address of the database.
      Name Enter the name of the database that contains all of the tables for replication. This is the database that you configured as part of the preinstallation tasks.
      Note: You cannot select a Db2 system database.
      Port Enter the port number of the database. If you require a secure socket layer (SSL) connection, enter the SSL port number.
      Advanced Click Advanced to specify extra JDBC parameters for the SSL connection and for Db2 pureScale work load balancing. Click Add for each parameter that you wish to add, enter the parameter name and value, and click OK.
      SSL connection
      Enter the following information for the SSL connection:
      . sslTrustStoreLocation = SSL_certificate_path
          . sslTrustStorePassword = keystore_password
          . sslConnection=true
      Where:
      SSL_certificate_path
      The path that contains the imported certificate on the client machine.
      keystore_password
      The password that was provided when the keystore was configured.
      For details, see Secure Sockets Layer (SSL) support in Db2 for Linux®, UNIX, and Windows.
      Work load balancing
      Enter the following information for work load balancing:
      . enableSysplexWLB = true
          . maxTransportObjects = 80
          . db2.jcc.maxRefreshInterval=10
      • For maxTransportObjects, the number of transport objects must be equal to or greater than the number of connection objects.
      • For db2.jcc.maxRefreshInterval, set the maximum refresh interval for all data source or connection instances that are created under the driver.
      For more information on setting up work load balancing, see Example of enabling Db2 on Linux, UNIX, and Windows systems workload balancing support in Java™ applications
      External keypair with Java user exit To use an external keypair authentation through Java user exit authentication, select the Would you like to configure external keypair authentation through a Java User Exit? option. You are prompted to enter the Java class name of the external keypair user exit, for example com.datamirror.ts.external.keystore.VaultExternalSecretStoreTest.
      Metadata Schema Select the database schema used by CDC Replication for metadata tables. You can specify any schema except those in use by other installed instances of CDC Replication for the given database.
      Note: CDC Replication metadata tables contain important configuration information and should be backed up as part of your database backup strategy.
  7. In the Refresh Loader Path area, click Browse to specify the directory for bulk inserts into the database. Both your Db2 database and CDC Replication must have read and write permissions for this directory.
    Notes:
    • You should use a different directory for each instance of CDC Replication.
    • This directory may contain database tables for replication. You should take this into consideration when determining user access to this directory.
  8. Optional: If you want to use a JMS provider as the method of communication between datastores, perform the following steps. Otherwise TCP/IP will be used exclusively as the communications protocol.

    A JMS provider should be used when characteristics of your network prevent the existence of a long term, stable TCP/IP connection.

    1. Ensure that a queue has been created by your system administrator and is named correctly. Each CDC Replication instance that is to use a JMS message provider must have a queue named in the format CDC_<port>, where <port> is the five digit TCP listening port number of the instance (you can left pad the number with zeroes if necessary, to ensure five digits).
    2. Click the Communications Protocol tab.
    3. Select JMS or TCP/IP.
    4. Click Add.
    5. Select the required JMS Provider .jar files.
    6. Click Add Connection.
    7. Enter a remote factory name. A connection factory encapsulates a set of connection configuration parameters that has been defined by an administrator.
    8. Enter a user name and password for JMS server authentication.

      This user name is defined by your JMS provider. Contact your system administrator for more information.

    9. Click the JNDI Server tab.
    10. Enter the constant that holds the local or remote connection factory name in the JNDI Initial Context box. Java Naming and Directory Interface (JNDI) is a programming interface from Oracle for connecting Java programs to naming and directory services.
    11. Enter the URL that is relative to the JNDI initial context in the JNDI URL box. In JNDI, all naming and directory operations are performed relative to a context. Therefore the JNDI defines an initial context that serves as a starting point for naming and directory operations. This value should be the fully-qualified class name of the factory class that will create the initial context.
    12. If the JNDI server to which you want to connect requires authentication, then you need to provide the user name and password to connect to that system. Contact your system administrator for information about the user name that you should specify.
    13. Click OK to save the connection.
    14. Click Test if you want to verify the connection.

      If the JMS Provider is not configured correctly, CDC Replication will use TCP/IP as the communication protocol between datastores.

    15. Click OK.
  9. Click OK to save your configuration settings for the CDC Replication instance.
  10. If CDC Replication has detected an unsupported encoding, a dialog will open asking you to select an alternate encoding from a list.

    You can filter the list of alternate encodings by clicking one of the following buttons:

    • Closest match—Displays the alternated encodings that are the closest match to the data.
    • Comparable encodings byte length—Displays the alternate encodings in order of byte length.
    • All–Displays all alternate encodings.

    Select an encoding from the list and click OK.

    If you click Cancel, an error message will be displayed and the instance will not be created.