Adding an instance of the CDC Replication Engine for Db2 Database (UNIX and Linux)
Before you can start replication, you must add and configure an instance.
Before you begin
Procedure
- If you are configuring the first instance of CDC Replication after installation, you can proceed to Step 3 of this procedure.
-
At the command prompt, launch the configuration tool by issuing the
following command in the specified directory:
\CDC_installation_directory\bin\dmconfigurets - At the welcome message, press Enter to continue.
- Enter 2 and press Enter to add a new instance of CDC Replication.
-
Enter the name of the instance that you want to add and press
Enter.
The instance name must be unique.
-
Enter the port number which CDC Replication
uses for communication with client workstations running Management Console and other servers. CDC Replication displays a default port of 10901. Press Enter.
This port number is not applicable for 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.
- 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
1GB 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. - Enter the amount of physically available RAM that you want to allocate for
this instance of CDC Replication and press
Enter. By default, the configuration tool allocates 1024 MB of RAM for each
instance.
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.
-
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.
- If you want to use TCP/IP as the exclusive method of communication between
datastores, enter
nand press Enter. If you want to have the option to use either a JMS provider or TCP/IP as the communications protocol, perform the following steps:A JMS provider should be used when characteristics of your network prevent the existence of a long-term, stable TCP/IP connection.
- 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 (example, CDC_00123).
- Enter
yand press Enter. - Enter
2to add a JMS provider. - Enter the fully qualified path to your JMS provider .jar file and press Enter.
- Enter
4and press Enter to complete the configuration of the JMS providers. - Enter
1to add a JMS connection. - Enter a JMS remote connection factory name and press Enter. For example, jms/ConnectionFactory. A connection factory encapsulates a set of connection configuration parameters that has been defined by an administrator. CDC Replication uses this to create a connection with your JMS provider.
- Enter the user name and press Enter.
- Enter the password to authenticate to the JMS server and press Enter.
- Enter the password a second time to confirm and press Enter.
- Enter the JNDI initial context and press Enter.
- Enter the URL that is relative to the JNDI Initial Context and press Enter.
- Enter the user name for the JNDI Principal and press Enter.
- Enter the JNDI credentials password and press Enter.
- Enter the password a second time to confirm and press Enter.
- Press Enter again to return to the Engine Communication Connection menu.
- Press
5if you want to verify the connection and then press Enter to return to the Engine Communication Connection menu.If the JMS Provider is not configured correctly, CDC Replication will use TCP/IP as the communication protocol between datastores.
- Enter
7to complete the configuration of the engine communication connection.
-
Specify whether you want to use a type 4 or type 2 connection to the Db2® database and press Enter. The default is type 2.
- If you specify a type 2 connection, when asked if you want to specify advanced parameters type n and press Enter. Then proceed to Step 11.
- If you specify a type 4 connection, when asked if you want to specify advanced parameters
type y and press Enter. Then follow these steps:
- Provide the host name (with fully qualified domain name) or IP address and port number of the
Db2 database. If your type 4 connection requires secure socket
layer (SSL), enter the SSL port as the database port and follow these steps:
- Enter the extra JDBC parameters in a semicolon-delimited list. For
example:
Where:sslTrustStoreLocation=SSL_certificate_path;sslTrustStorePassword=keystore_password;sslConnection=true;- 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.
- Press Enter.
- Set up SSL in Db2. For details, see Secure Sockets Layer (SSL) support in Db2 for Linux®, UNIX, and Windows.
- Enter the extra JDBC parameters in a semicolon-delimited list. For
example:
- To configure work load balancing (WLB) for Db2
pureScale®, enter the extra JDBC parameters in a
semicolon-delimited list. For example:
enableSysplexWLB=true;maxTransportObjects=80;db2.jcc.maxRefreshInterval=10;enableSysplexWLB=true- 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.
- Provide the host name (with fully qualified domain name) or IP address and port number of the
Db2 database. If your type 4 connection requires secure socket
layer (SSL), enter the SSL port as the database port and follow these steps:
-
Enter the name of the Db2 instance that you want to
replicate data to or from and that contains all of the tables for replication. For a Type 4
connection in a remote configuration where the database is not cataloged, select a Db2 instance on
the local system (client).
Note: For API (IAM) key authentication, please provide the remote Db2 instance name. Cataloging is not required.
-
Enter the name of the database that you want to replicate data to or from and that contains all
of the tables for replication. This is the database that you configured as part of the
preinstallation tasks. For a remote configuration, select the Other option
and enter the remote database name. Press Enter.
Note: You cannot select a Db2 system database.
- If type 4 connection type was selected and to use an external keypair through Java user
exit authentication, enter Y and press Enter.
You are prompted to enter the Java class name of the external secret store user exit, for example
com.datamirror.ts.external.keystore.VaultExternalSecretStoreTest. - To use an external secret through Java user exit authentication, enter Y and press
Enter.
You are prompted to enter the Java class name of the external secret store user exit, for example
com.datamirror.ts.external.keystore.VaultExternalSecretStoreTest.- Enter the case-sensitive database user key from the external secret store for the specified database and press Enter.
- Enter the case-sensitive database password key from the external secret store for the specified database and press Enter.
For more information, see Creating an instance by using database credentials stored in an external secret store
- Enter the user name for the specified database and press Enter.
- Enter the password for the specified database and press Enter. The configuration tool will now search the database for schemas.
- Enter the number that corresponds to the database schema used by CDC Replication for metadata tables and press Enter. You can specify any schema except those in use by other installed instances of CDC Replication for the given database.
- Enter the path to the directory that will be used for bulk inserts into the database.
Press Enter. Both your Db2 database and
CDC Replication must have read
and write permissions for this directory.
- Enter the path to the directory to be used for bulk inserts into the database and press Enter. 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.
- If CDC Replication detects an unsupported encoding, an error
message will be displayed and you will be asked to choose an alternate encoding.
- Enter
yto proceed.If you enter
nand press Enter to cancel, the instance will not be created. - Enter a value to choose how the alternate encodings will be displayed:
- 1
- Displays the available alternate encodings that are the closest match to the database.
- 2
- Displays the available alternate encodings in order of byte length.
- 3
- Displays all available alternate encodings.
- Enter the number for the encoding to be used and press Enter.
- Enter
-
The configuration tool creates the CDC Replication instance and prompts you to start the
instance. Enter
yto start the instance.The configuration tool will prompt you if your configuration is about to overwrite the metadata for an existing instance.