Adding an active log data set to the active log inventory with the SET LOG command

You can use the SET LOG command to add a new active log data set to the active log inventory without stopping and starting Db2.

Before you begin

Before you issue the SET LOG command, define and format the new active log data sets.

  1. Use the Access Method Services DEFINE command to define new active log data sets.
  2. Use the DSNJLOGF utility to preformat the new active log data sets.

    If you do not preformat the active logs with the DSNJLOGF utility, the Db2 database manager needs to preformat them the first time that they are used, which might have a performance impact.

Procedure

To add an active log data set to the active log inventory:

Issue the SET LOG command with the NEWLOG and COPY keywords.
If the Db2 database manager can open the newly defined log data set, the log data set is added to the active log inventory in the bootstrap data set (BSDS). The new active log data set is immediately available for use without stopping and starting the database manager.

Start of changeCurrently, if you do not stop and start Db2 during the period after you add new active log data sets to the inventory and before Db2 uses those active log data sets, Db2 uses the active log data sets in the reverse order from the order in which you add them to the active log inventory with the SET LOG command. For example, suppose that the active log inventory contains data sets DS01, DS02, and DS03, and you add data set DS04 and then data set DS05. If data set DS03 is active, and you issue the ARCHIVE LOG command, the new active log becomes DS05. However, if you stop and start Db2 during the period after you add new active log data sets and before Db2 uses them, the order of use might be different.End of change

Start of changeThis behavior might change in the future, so schemes for adding and switching active logs should not depend on this order.End of change