Deleting an active log data set from the BSDS with the -SET LOG command
You can use the SET LOG REMOVELOG command to delete an existing active log data set from the BSDS without stopping and starting Db2.
Before you begin
Before you issue the SET LOG REMOVELOG command, the following must be true:
- Archiving must be active with the subsystem parameter OFFLOAD set to YES.
- The Db2 member can not be defined as SOURCE or PROXY in a GDPS Active/Active ZDL configuration.
The following must be true for the active log data set:
- Must exist in the specified COPY.
- Must be marked REUSABLE.
- Must not be the current active log.
- Must not be the next current active log.
Procedure
- For non-data sharing active logs
The active log is flagged as REMOVAL PENDING if it isn't already marked, which prevents the log from being used for any new log requests.
The result of the SET LOG command is reported in a message.
- If the active log is in use, monitor the usage and issue the command again once the log is no longer in use.
- If the active log is not in use, it is deallocated and the active log entry is deleted from the BSDS.
The next time Db2 is restarted, logs marked REMOVAL PENDING will be removed and message DSNJ392I is issued.
- For data sharing active logs
The active log is marked as REMOVAL PENDING if it isn't already marked, and all peer members of the data sharing group are notified. This prevents the log from being used for any new log requests.
The result of the SET LOG command is reported in a message.
- If the active log is in use by the local member or peer members, monitor the usage and issue the command again once the log is no longer in use.
- If the active log is no longer in use, it is deallocated and the active log entry is deleted from the BSDS.
The next time Db2 is restarted, logs marked REMOVAL PENDING will not be removed. You must re-issue SET LOG REMOVELOG to remove it.