Planning for storage
If your source database contains column-organized tables, a file system is used to stage supplemental log files that are generated by Db2® for each partition. You need to plan for disk space requirements on the source and target.
- Disk space needed for Db2 supplemental logging on column-organized tables at the source
-
By default, the files that are written by Db2 to the file system are deleted by the capture program after they have been transmitted to the target.
After supplemental logging is enabled on a table, Db2 produces files even if the capture program is not running. It is therefore important to allocate enough disk space to withstand periods when the capture program or replication set is stopped. For example, when upgrading software at one site, you redirect all workloads to the second site and stop replication between the two sites for the duration of the upgrade.
A good rule of thumb for estimating disk space requirement is to have enough space to keep 12 to 24 hours of captured changed data. Monitor and manage the shared disk space usage to ensure that disk space remains available for replication and is not used up by other applications. On Db2 Warehouse, consider using a dedicated storage area network device.
- Disk space needed by for receiving supplemental log files at the target
-
Supplemental log files for column-organized tables are deleted by the apply program after each streamed transaction is committed. When all replicated tables are active, you only need enough disk space to hold the data that is modified by concurrently executing transactions.
Disk space is also needed during the initial target table loading process to hold changes that are made to the target table until the load completes. For example, assume a very large table takes 20 hours to load over a wide area network, and that an additional 1 TB of data is inserted during that time into the table. You must have enough disk space at the target to stage the 1 TB of new data.
The default directory for holding supplemental log files is:
- IAS
- /bludrdb2data/db2 mounted on /scratch file system.
- Db2 Warehouse
- /mnt/bludrdb2data/db2
You can change the default directory for supplemental log files by updating the Db2 environment variable DB2_DCC_FILE_PATH using the db2set command.