Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Recover for Db2 13.1.

LOGSCAN command


The LOGSCAN command provides information about the number and size of log records required for recovery. You can use this information to size the log sort. 

BMC AMI Recover

 prints a report describing the log records for each object that is named in the LOGSCAN.

LOGSCAN syntax

The following figures show the syntax of the LOGSCAN command.

LOGSCAN syntax diagram

GUID-97148A84-DC75-486A-ADCE-22F3DBBE866E-low.png

LOGSCAN syntax—Table space specification

GUID-7E6AF3D2-E89D-4DDE-A83A-6615231D4BB4-low.png

LOGSCAN syntax—Single index specification

GUID-C7698E59-110E-4F44-9070-544328EC9A32-low.png

LOGSCAN syntax—Multiple index specification

GUID-4063AB7C-21D2-4679-993A-B5FFD027A1D8-low.png

LOGSCAN syntax—TORBA or TOLOGPOINT specification

GUID-9EAE6BAE-D903-4F17-B354-926F9E37EAB3-low.png

LOGSCAN command dependencies and prohibitions

The dependencies and prohibitions for using the LOGSCAN command are as follows:

  • A LOGSCAN command cannot be included in the same SYSIN with any of the following statements:
    • RECOVER TABLESPACE
    • RECOVER INDEXSPACE
    • RECOVER INDEX
    • RECOVER UNLOADKEYS
    • RECOVER BUILDINDEX
    • REBUILD INDEX
    • ACCUM
  • If you specify FROMRBA or FROMLOGPOINT, you must specify LOGAPPLY ONLY as well.
  • If you specify BACKOUT, you cannot specify LOGONLY or LOGAPPLY ONLY.
  • The LOGSCAN command does not consider change accumulation files.

Additionally, consider the following items when you scan indexes:

  • If you have used the PACLOG for DB2 utility to exclude the index log records, the LOGSCAN command cannot be used for such indexes.
  • If you specify LOGSCAN INDEX (ALL) or LOGSCAN INDEXSPACE (ALL), LOGSCAN INDEX and LOGSCAN INDEXSPACE do not support the FROMRBA/FROMLOGPOINT options. You can use separate index specifications with LOGSCAN INDEX and LOGSCAN INDEXSPACE to use those options.
  • If a table space is scanned to a prior point in time, the default TORBA or TOLOGPOINT value for recovery of any indexes on that table space is the log point specified for the table space. If you specify different log points for the table space and its index with TORBA or TOLOGPOINT, BMC AMI Recover ends with an error.
  • BMC AMI Recover does not prevent a scan a specific point in time for an index that does not include a scan for the table space or other indexes on the table space.
  • Indexes must always have a copy or other backup if LOGSCAN INDEX or LOGSCAN INDEXSPACE is used without BACKOUT. If an index is created on a table that contains data, Db2 does not log the index updates. Similarly, index rebuilds or updates that result from LOG YES utilities are not logged. If the index is created on a table, an image copy or other backup must be made before the index can be scanned.
  • In addition to the LOG NO SYSCOPY events that make a table space unrecoverable, any LOAD LOG YES or REORG LOG YES event between the image copy and the TORBA or TOLOGPOINT value makes an index unrecoverable. REBUILD INDEX and REORG INDEX can also render an index unrecoverable, and BMC AMI Recover cannot detect these events if non-BMC utilities are used.
  • You cannot use LOGSCAN INDEX or LOGSCAN INDEXSPACE through a point-in-time recovery event created by using BACKOUT.

LOGSCAN option descriptions

LOGSCAN provides information about the number and size of log records required for recovery. You can use this information to size the log sort. A report is printed describing the log records for each object named in the LOGSCAN.

The following topics describe the options available with LOGSCAN. Not all of the options described are valid in a single LOGSCAN TABLESPACE, LOGSCAN INDEX, or LOGSCAN INDEXSPACE command. The recovery strategy that best meets your needs determines which options you should include in a single command statement.

The LOGSCAN TABLESPACE, LOGSCAN INDEX, and LOGSCAN INDEXSPACE commands specify one or more table spaces or indexes, or table space or index data sets, for scanning. A single table space, index, or data set can be scanned to a specific log point or to the current state (by using all of the log records that apply). Multiple table spaces, indexes, or data sets can also be scanned to a specific log point or to the current state. You can have as many LOGSCAN TABLESPACE, LOGSCAN INDEX, or LOGSCAN INDEXSPACE commands in a job step as necessary; however, BMC AMI Recover examines all command statements in the job step before processing starts so that all log processing can be combined and activities can be optimally scheduled.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*