Compatibility of online backup and other utilities
Some utilities can be run at the same time as an online backup, but others cannot.
- CREATE INDEX
In SMS mode, online index create and online backup do not run concurrently due to the ALTER TABLE lock. Online index create acquires it in exclusive mode while online backup acquires it in share.
In DMS mode, online index create and online backup can run concurrently in most cases. There is a possibility if you have a large number of tables in the same tablespace as the one in which you are creating the index, that the online index create will internally acquire an online backup lock that will conflict with any concurrent online backup.
- REORG INDEX with the ONLINE option
As with online index create, in SMS mode, online index reorganization do not run concurrently with online backup due to the ALTER TABLE lock. Online index reorganization acquires it in exclusive mode while online backup acquires it in share. In addition, an online index reorganization operation, quiesces the table before the switch phase and acquires a Z lock, which prevents an online backup. However, the ALTER TABLE lock should prevent an online backup from running concurrently before the Z table lock is acquired.
In DMS mode, online index reorganization and online backup can run concurrently.
In addition, online index reorganization quiesces the table before the switch phase and gets a Z lock, which prevents an online backup.
The import utility is compatible with online backup except when the IMPORT command is issued with the REPLACE parameter, in which case, import gets a Z lock on the table and prevents an online backup from running concurrently.
- TRUNCATE TABLE
For SMS (System Managed Space), the TRUNCATE statement is not compatible with online backup because it gets a Z lock on the table and prevents an online backup from running concurrently.
TRUNCATE will not progress if an online backup is active, as the online backup utility will hold an online back up (OLB) lock which is not compatible with TRUNCATE. In this case, the TRUNCATE will not timeout, regardless of the system defined timeout value. TRUNCATE will wait until the online backup is completed and before starting.
Load operations that specify the ALLOW READ ACCESS parameter are not compatible with online backups when the LOAD command is issued with the COPY NO parameter. In this mode the utilities both modify the table space state, causing one of the utilities to report an error. Load operations that specify the ALLOW READ ACCESS parameter do not lead to an error if they also specify the COPY YES option. although there might still be some compatibility issues. In SMS mode, the utilities can execute concurrently, but they hold incompatible table lock modes and consequently might be subject to table lock waits. In DMS mode, the utilities both hold incompatible
online backup(OLB) lock modes and might be subject to waits on that lock. If the utilities execute on the same table space concurrently, the load utility might be forced to wait for the backup utility to complete processing of the table space before the load utility can proceed.
- REORG TABLE with the ONLINE option
The cleanup phase of online table reorganization cannot start while an online backup is running. You can pause the table reorganization, if required, to allow the online backup to finish before resuming the online table reorganization.
You can start an online backup of a DMS table space when a table within the same table space is being reorganized online. There might be lock waits associated with the reorganization operation during the truncate phase.
You cannot start an online backup of an SMS table space when a table within the same table space is being reorganized online. Both operations require an exclusive lock.
- DDLs that require a Z lock (such as ALTER TABLE, DROP TABLE, and
Online DMS table space backup is compatible with DDLs that require a Z lock.
Online SMS table space backup must wait for the Z lock to be released.
- Storage group DDLsIf you are modifying the database storage groups by issuing one of the following statements, you should take care to coordinate this operation with your online backup schedule:
- CREATE STOGROUP
- ALTER STOGROUP
- DROP STOGROUP
- RENAME STOGROUP
- ALTER DATABASE
- RUNSTATS with the ALLOW WRITE or ALLOW
The RUNSTATS command is compatible with online backup except when the system catalog table space is an SMS table space. If the system catalog resides in an SMS table space, then the RUNSTATS command and the online backup hold incompatible table locks on the table causing lock waits.
- ALTER TABLESPACE
Operations that enable or disable autoresize, or alter autoresize containers, are not permitted during an online backup of a table space.
- ALTER TABLESPACE with the REBALANCE option
When online backup and rebalancer are running concurrently, online backup pauses the rebalancer and does not wait for it to complete.
- REORG TABLE
- RESTORE DATABASE
- ROLLFORWARD DATABASE
- LOAD with the ALLOW NO ACCESS option
- SET WRITE
- BACKUP DATABASE with the ONLINE option
- ALTER TABLE ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE
- REORG INDEX with the ALLOW NO ACCESS option
This applies to database-level online backups and table-space-level online backups (if they involve the same table space or table spaces).