IBM Books

Command Reference

LIST HISTORY

Lists entries in the history file. The history file contains a record of recovery and administrative events. Recovery events include full database and table space level backup, restore, and roll forward. Additional logged events include alter table space, run statistics, reorganize table, drop table, and load.

Authorization

None

Required Connection

Instance. An explicit attachment is not required. If the database is listed as remote, an instance attachment to the remote node is established for the duration of the command.

Command Syntax

>>-LIST HISTORY----+------------------+------------------------->
                   +-BACKUP-----------+
                   +-ROLLFORWARD------+
                   +-RUNSTATS---------+
                   +-REORG------------+
                   +-ALTER TABLESPACE-+
                   +-DROPPED TABLE----+
                   '-LOAD-------------'
 
>-----+-ALL--------------------------------+-------------------->
      +-SINCE--timestamp-------------------+
      '-CONTAINING--+-schema.object_name-+-'
                    '-object_name--------'
 
>----FOR--+----------+---database-alias------------------------><
          +-DATABASE-+
          '-DB-------'
 

Command Parameters

HISTORY
Lists all recovery and administration events which are currently logged in the history file.

BACKUP
Lists backup and restore operations.

ROLLFORWARD
Lists roll forward operations.

RUNSTATS
Lists RUNSTATS operations.

REORG
Lists table reorganization operations.

ALTER TABLESPACE
Lists ALTER TABLESPACE operations.

DROPPED TABLE
Lists dropped tables.

LOAD
Lists load operations.

ALL
Lists all entries of the specified type in the history file.

SINCE timestamp
A complete time stamp (format yyyymmddhhnnss), or an initial prefix (minimum yyyy) can be specified. All entries with time stamps equal to or less than the time stamp provided are listed.

CONTAINING schema.object_name
This qualified name uniquely identifies a table.

CONTAINING object_name
This unqualified name uniquely identifies a table space.

FOR DATABASE database-alias
Used to identify the database whose recovery history file is to be listed.

Examples

   db2 list history since 19980201 for sample
   db2 list history backup containing userspace1 for sample
   db2 list history dropped table all for db sample

Usage Notes

The report generated by this command contains the following symbols:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]