0 / 0
Replicating Db2 on Cloud data
Replicating Db2 on Cloud data

Replicating Db2 on Cloud data

You can replicate data to and from Db2 on Cloud using Data Replication.

Db2 on Cloud is an SQL database that is managed by and is provisioned for you in the cloud.

Steps to configure Db2 on Cloud as a source or target for Data Replication

1. Configure database logging parameters (for source connections)

Enable log retention for each database that you intend to use for replication. If you wish to replicate table structure changes, enable DDL statement logging as well.

UPDATE DATABASE CONFIGURATION USING LOGARCHMETH1 logretain DEFERRED
UPDATE DATABASE CONFIGURATION USING LOG_DDL_STMTS YES

2. Set table DATA CAPTURE CHANGES to YES (for source connections)

In order for Data Replication to replicate schemas and tables, the tables need to have DATA CAPTURE CHANGES set to YES. You can enable this manually for each table you wish to replicate. Alternatively, Data Replication will automatically enable DATA CAPTURE CHANGES if the user account you specify in your connection has system administrator (SYSADM) or database administrator (DBA) privileges enabled, but only for tables that exist at the time you create a Data Replication asset that uses the Copy goal.

3. Assign database user privileges (for target connections)

To replicate data to your database, as a target connection, you need only a user account that can create schemas and tables.

4. Create a connection in a project

  1. Go to the site to log in with your personal credentials:

  2. Click on an existing project. If you do not yet have a project, see Configuring a project.

  3. Click New asset and select Connection.
  4. Select Db2 on Cloud connection. Fill in a name and optionally a description. To find the values for the Database, Hostname and Port, ask your Db2 on Cloud administrator.
    Under Credentials, fill in the username and password. Use the username described in Step 2.

    Checkmark Port is SSL-enabled.
  5. Click Test connection. If this is not successful, check that the credentials and database were entered correctly and test again.
  6. Click Create.

Next step: Add data replication assets

Parent topic: Supported Data Replication connections