Copying the data
You can use the COPY utility to copy the data, taking appropriate precautions about concurrent activity.
About this task
In one operation, you can copy the data and establish a point of consistency for a list of objects by using the COPY utility with the option SHRLEVEL REFERENCE. That operation allows only read access to the data while it is copied. The data is consistent at the time when copying starts and remains consistent until copying ends. The advantage of this operation is that the data can be restarted at a point of consistency by restoring the copy only, with no need to read log records. The disadvantage is that updates cannot be made while the data is being copied.
You can use the CONCURRENT option of the COPY utility to make a backup, with DFSMSdss concurrent copy, that is recorded in the Db2 catalog.
- Use the COPY utility with the SHRLEVEL CHANGE option.
- Use an offline program to copy the data, such as DSN1COPY, DFSMShsm, or disk dump.
If you allow updates while copying, step 3 is recommended. With concurrent updates, the copy can include uncommitted changes. Those might be backed out after copying ends. Thus, the copy does not necessarily contain consistent data, and recovery cannot rely on the copy only. Recovery requires reading the log up to a point of consistency, so you want to establish such a point as soon as possible. Although RECOVER can recover your data to any point in time and ensure data consistency, recovering to a quiesce point can be more efficient. Therefore, taking periodic quiesce points is recommended, if possible.
You can copy all of the data in your system, including the Db2 catalog and directory data by using the BACKUP SYSTEM utility. Since the BACKUP SYSTEM utility allows updates to the data, the system-level backup can include uncommitted data.