Allows the storage and retrieval of DB2® log files to and from tape. The db2tapemgr command reads the logarchmeth1 value and copies these log files from disk to the specified tape
device, then it updates the recovery history file with the new location
of the copied log files.
Note: This command is not supported in DB2 pureScale® environments.
Authorization
One of the following authorities:
Command syntax
>>-db2tapemgr--+-------------------------------------+---------->
'-+-DATABASE-+--source-database-alias-'
'-DB-------'
>--+----------------------+--+---------------------+------------>
'-ON DBPARTITIONNUM--n-' '-LOGSTREAMID--ID_num-'
>--+-+-STORE--------+--| store option clause |-+--+------------------+--+-------+-><
| '-DOUBLE STORE-' | '-USING--blocksize-' '-EJECT-'
+-RETRIEVE--| retrieve option clause |------+
+-SHOW TAPE HEADER--tape device-------------+
+-EJECT TAPE--tape device-------------------+
+-DELETE TAPE LABEL--tape label-------------+
'-QUERY--| for rollforward clause |---------'
store option clause
.-ALL LOGS-.
|--ON--tape device--+------------------------+--+----------+--+-------+--|
'-TAPE LABEL--tape label-' '-n--LOGS--' '-FORCE-'
retrieve option clause
|--+-+-| for rollforward clause |-+--FROM--tape device--+---------------+-+--|
| +-ALL LOGS-------------------+ '-TO--directory-' |
| '-LOGS--n--TO--m-------------' |
'-HISTORY FILE--FROM--tape device--TO--directory-----------------------'
for rollforward clause
.-FOR ROLLFORWARD TO END OF LOGS-----------------------.
|--+------------------------------------------------------+----->
| .-local time--USING LOCAL TIME-. |
'-FOR ROLLFORWARD TO--+------------------------------+-'
'-isotime--USING GMT TIME------'
>--+----------------------------------+-------------------------|
'-USING HISTORY FILE--history file-'
Command parameters
- DATABASE source-database-alias
- Specifies the name of the database. If no value is specified, DB2DBDFT will be used. If no value is specified, and DB2DBDFT is not set, the operation fails.
- ON DBPARTITIONNUM n
- Specifies the database partition number to work on. If no value
is specified, DB2NODE is used.
- LOGSTREAMID ID_num
- Specifies the log stream ID to work on. If no value is specified,
all log streams will be used.
- STORE ON tape device
- Stores log file to tape and deletes it.
- DOUBLE STORE ON tape device
- Stores all log files that have been stored only once and those
log files never stored. Deletes only the log files that have been
stored twice to tape; others are kept on disk.
- TAPE LABEL
- Specifies a label to be applied to the tape. If tape
label is not specified, one will be generated automatically
in the following format: database-alias|timestamp (up to 22 characters, up to 8 characters for
the database alias and 14 characters for the time stamp in seconds).
- ALL LOGS or n LOGS
- Specifies that the command applies to all logs or a specified
number of logs.
- FORCE
- Specifies that if the tape has not expired, then over write it.
- USING blocksize
- Specifies the block size for tape access. The default size is 5120, and it must be a multiple of 512. The minimum is 512.
- EJECT
- Specifies that the tape is to be ejected after the operation completes.
- RETRIEVE FOR ROLLFORWARD TO
- Specifies that the utility will interactively prompt for all logs
that are required for the specified rollforward and retrieve them
from tape. If a directory is not specified, the path specified by
the overflowlogpath configuration parameter
is used. If a directory is not specified and overflowlogpath is not set, the operation fails.
- END OF LOGS
- Specifies that log files up to the end of the log will be retrieved.
- isotime USING GMT TIME
- Specifies that log files up to the time specified will be retrieved.
- local time USING LOCAL TIME
- Specifies that log files up to the time specified will be retrieved.
- USING HISTORY FILE history file
- Specifies an alternate history file to be used.
- FROM tape device
- Specifies the tape device to retrieve log files from.
- TO directory
- Specifies a directory to copy retrieved log files to.
- RETRIEVE ALL LOGS or LOGS n TO m
- Specifies that the command applies to all logs or a specified
number of logs on a tape.
- FROM tape device
- Specifies the tape device to retrieve log files from.
- TO directory
- Specifies a directory to copy retrieved log files to.
- RETRIEVE HISTORY FILE
- Retrieves the history file
- FROM tape device
- Specifies the tape device to retrieve log files from.
- TO directory
- Specifies a directory to copy retrieved log files to.
- SHOW TAPE HEADER tape device
- Shows the content of the tape header file DB2TAPEMGR.HEADER
- EJECT TAPE tape device
- Ejects the tape.
- DELETE TAPE LABEL tape label
- Deletes all locations from the history file that refer to the
specified tape label.
- QUERY FOR ROLLFORWARD TO
- Displays the location of the log files that are required for rollforward.
- END OF LOGS
- isotime USING GMT TIME
- Specifies that the operation should query the logs up to the time
specified.
- local time USING LOCAL TIME
- Specifies that the operation should query the logs up to the time
specified.
- USING HISTORY FILE history file
- Specifies an alternate history file to be used.