Initial loading of Db2 replication targets
Replication can load copies of a table into a target database and keep it synchronized in near real-time with the source database with zero impact on applications that use the tables, and with no outage.
When you create a replication set, the replication process can create a target table that matches the source table and load the target table with data from the source. During the loading process, applications can continue to use the source table.
The automatic load process is driven by the apply program, which connects to the source database to read the data from the source table and insert this data into the target table. While the table is being loaded, changes to the source table are captured and staged into an IBM® MQ queue at the target. When the loading process is finished, the backlog of changes is applied.
Very large tables, for example a single table of several terabytes that is also compressed, can take a long time to load across the network over long distance. Plan to load very large databases over several days, a few tables at a time starting with the largest ones.
You do not have to use this automated process; in some cases you might want to load target tables manually. In the web console, clear the Copy existing table data and replicate future updates check box when you are creating the replication set. With this option, no automatic loading occurs. You can use your chosen utility to export data from the source, import the data into the target, and then start replication for the table manually after the loading process completes.
To load the target tables manually outside of the replication process, you must quiesce applications that update the source and target tables. Manually run any fast-performing utility to quickly synchronize the source and target tables before you activate replication for the tables.
For row-organized tables, by default, the apply program loads the table by invoking the Db2 LOAD utility over a remote database connection. For column-organized tables, by default, the apply program loads the table by using an external table load with a remote source Db2 command.