Administrator's Reference

QUERY DRMEDIA (Query Disaster Recovery Media)

Use this command to display information about database backup and copy storage pool volumes. You can also use the command to create a file of executable commands to process the volumes.

Note:The MOVE DRMEDIA command always processes copy storage pool volumes (see the description of the COPYSTGPOOL parameter for more information). You can use the SOURCE parameter to control whether the command processes database backup volumes.

Privilege Class

To issue this command, you must have one of the following privilege classes:

Syntax

                    .-*------------.
>>-Query DRMedia----+--------------+---------------------------->
                    '-volume_name--'
 
      .-WHERESTate--=--All-----------------.
>-----+------------------------------------+-------------------->
      '-WHERESTate--=--+-----------------+-'
                       +-All-------------+
                       +-MOuntable-------+
                       +-NOTMOuntable----+
                       +-COUrier---------+
                       +-VAult-----------+
                       +-VAULTRetrieve---+
                       +-COURIERRetrieve-+
                       '-REmote----------'
 
>-----+---------------------+---+-------------------+----------->
      '-BEGINDate--=--date--'   '-ENDDate--=--date--'
 
>-----+---------------------+---+-------------------+----------->
      '-BEGINTime--=--time--'   '-ENDTime--=--time--'
 
>-----+----------------------------+---------------------------->
      '-COPYstgpool--=--pool_name--'
 
      .-Source--=--DBBackup-------.
>-----+---------------------------+----------------------------->
      '-Source--=--+-DBBackup---+-'
                   +-DBSnapshot-+
                   '-DBNone-----'
 
      .-Format--=--Standard-----.
>-----+-------------------------+------------------------------->
      '-Format--=--+-Standard-+-'
                   +-Detailed-+
                   '-Cmd------'
 
>-----+-----------------------------+--------------------------->
      '-WHERELOCation--=--location--'
 
>-----+--------------------------+------------------------------>
      |         .--------------. |
      |         V              | |
      '-CMd--=-----"command"---+-'
 
                                       .-APPend--=--No------.
>-----+----------------------------+---+--------------------+--><
      '-CMDFilename--=--file_name--'   '-APPend--=--+-No--+-'
                                                    '-Yes-'
 

Parameters

volume_name
Specifies the name of the database backup and copy storage pool volumes to be queried. You can use wildcard characters to specify multiple names. This parameter is optional. The default is to query all database backup volumes and all copy storage pool volumes associated with the storage pools named in the COPYSTGPOOL parameter or set by SET DRMCOPYSTGPOOL command (if there is no COPYSTGPOOL parameter).

WHEREState
Specifies the state of volumes to be processed. This parameter is optional. The default is ALL. Possible values are:

All
Specifies all volumes in all states.

MOuntable
Volumes in this state contain valid data and are accessible for onsite processing.

NOTMOuntable
Volumes in this state are onsite, contain valid data, and not accessible for onsite processing.

COUrier
Volumes in this state are being moved to an offsite location.

VAult
Volumes in this state are offsite, contain valid data, and are not accessible for onsite processing.

VAULTRetrieve
Volumes in this state do not contain valid data and are at the offsite vault.

COURIERRetrieve
Volumes in this state being moved back to the onsite location.

REmote
Volumes in this state contain valid data and are located at the offsite remote server.

BEGINDate
Specifies the beginning date used to select volumes. This parameter is optional. Volumes are considered eligible if the MOVE DRMEDIA command has changed the volume to its current state on or after the specified date. The default is the earliest date for which volume information exists. You can specify the data using one of the values below:
Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY-days or-days The current date minus days specified. The maximum number of days is 9999. TODAY-7 or -7.

To query volumes beginning with records changed to their current state a week ago, you can specify BEGINDATE=TODAY-7 or BEGINDATE=-7.

ENDDate
Specifies the ending date used to select volumes. This parameter is optional. Volumes are considered eligible if the MOVE DRMEDIA command has changed the volume to its current state on or before the specified date. The default is the current date. You can specify the data using one of the values below:
Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY-days or-days The current date minus days specified. The maximum number of days is 9999. TODAY-7 or -7.

To query volumes beginning with records changed to their current state a week ago, you can specify BEGINDATE=TODAY-7 or BEGINDATE=-7.

BEGINTime
Specifies the beginning time used to select volumes. This parameter is optional. Volumes are considered eligible if the MOVE DRMEDIA command has changed the volume to its current state on or after the specified time and date. The default is midnight (00:00:00) on the date specified with the BEGINDATE parameter.

You can specify the data using one of the values below:

Value Description Example
HH:MM:SS A specific time on the specified begin date 12:33:28
NOW The current time on the specified begin date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified begin date NOW+03:00 or +03:00.

If you issue QUERY DRMEDIA command at 9:00 with BEGINTIME=NOW+03:00 or BEGINTIME=+03:00. TSM displays volumes that were changed to their current state at 12:00 on the begin date you specify.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified begin date NOW-03:30 or -03:30.

If you issue QUERY DRMEDIA command at 9:00 with BEGINTIME=NOW-03:30 or BEGINTIME=-03:30. TSM displays volumes that were changed to their current state at 5:30 on the begin date you specify.

ENDTime
Specifies the ending time used to select volumes. This parameter is optional. Volumes are considered eligible if the MOVE DRMEDIA command has changed the volume to its current state on or before the specified time and date. The default is 23:59:59.

You can specify the data using one of the values below:

Value Description Example
HH:MM:SS A specific time on the specified end date 10:30:08
NOW The current time on the specified end date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified end date NOW+03:00 or+03:00.

If you issue QUERY DRMEDIA command at 9:00 with ENDTIME=NOW+03:00 or ENDTIME=+03:00, TSM processes volumes that were changed to their current state at 12:00 on the end date you specify.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified end date NOW-03:30 or -03:30

If you issue QUERY DRMEDIA command at 9:00 with ENDTIME=NOW-03:00 or ENDTIME=-03:00, TSM processes volumes that were changed to their current state at 6:00 on the end date you specify.

COPYstgpool
Specifies the name of the copy storage pool whose volumes are to be processed. This parameter is optional. You can use wildcard characters to specify this name. The copy storage pools specified with this parameter override those specified with the SET DRMCOPYSTGPOOL command. If you do not specify a copy storage pool name, all volumes in the specified state, except MOUNTABLE state, are processed. See SET DRMCOPYSTGPOOL command for processing the volumes in the MOUNTABLE state.

Source
Specifies whether database backup volumes are selected. This parameter is optional. The default is DBBACKUP. Possible values are:

DBBackup
Full with incremental database backup volumes are selected.

DBSnapshot
Snapshot database backup volumes are selected.

DBNone
Database backup volumes are not selected.

Format
Specifies the information to be displayed. This parameter is optional. The default is STANDARD. Possible values are:

Standard
Specifies that partial information is displayed.

Detailed
Specifies that detailed information is displayed.

Cmd
Specifies that executable commands are built for the selected volumes. If you specify FORMAT=CMD, you must also specify the CMD parameter.

WHERELOcation
Specifies the location of the volumes to be queried. This parameter is optional. The maximum length of the location is 255 characters. Enclose the text in quotation marks if it contains any blank characters. If you specify a target server name, DRM displays all database backup volumes and copy storage pool volumes located on the target server.

CMd
Specifies the creation of executable commands to process the volume name and location obtained by this command. This parameter is optional. You must enclose the command specification in quotation marks. The maximum length of this parameter is 255 characters. DRM writes the commands to a file specified by the CMDFILENAME parameter or the SET DRMCMDFILENAME command, or generated by the QUERY DRMEDIA command. If the command length is greater than 240 characters, it is split into multiple lines and a continuation characters (+) are added. You may need to alter the continuation character according to the product that runs the commands.

If you do not specify the FORMAT=CMD parameter, this command will not write create any command lines.

string
The command string. Do not include embedded quotation marks. For example,

VALID:

CMD="CHECKIN LIBVOLUME LIB8MM &VOL STATUS=SCRATCH"

NOT VALID:

CMD=""CHECKIN LIBVOLUME LIB8MM" &VOL STATUS=SCRATCH""

substitution
Specifies a substitution variable to tell QUERY DRMEDIA to substitute a value for the variable. The variables are not case-sensitive, and must not contain blank spaces after the ampersand (&). The possible variables are:

&VOL
A volume name variable.

&LOC
A volume location.

&VOLDSN
The name of the file the server writes into the sequential access media labels. An example of a copy storage pool tape volume file name using the default prefix ADSM is ADSM.BFS. An example of a database backup tape volume file name using a prefix ADSM310 defined with the device class is ADSM310.DBB.

&NL
The new line character. When &NL is specified, QUERY DRMEDIA command splits the command at the &NL variable and does not append a continuation character. You must specify the proper continuation character before the &NL if one is required. If the &NL is not specified and the command line is greater than 240 characters, the line is split into multiple lines and continuation characters (+) are added.

CMDFilename
Specifies the fully qualified name of the file to contain the commands specified with CMD parameter. This parameter is optional. If you do not specify a file name, the name from the SET DRMCMDFILENAME is used. If you do not specify a name with the SET DRMCMDFILENAME, TSM creates a file name by appending exec.cmds to the directory pointed to by the DSMSERV_DIR environment variable or to the directory path name of the current working directory of the TSM server. If you specify a null string (""), the commands are displayed on the console only. You can redirect the commands to a file using the redirection character for the operating system.

If the operation fails after the command file has been created, the file is not deleted.

APPend
Specifies whether to overwrite any existing contents of the command file or append the commands to the file. This parameter is optional. The default is NO. Possible values are:

No
DRM overwrites the contents of the file.

Yes
DRM appends the commands to the file.

Examples

Task 1

Display all volumes to be given to a courier for offsite storage.

Command:
query drmedia wherestate=notmountable format=standard

Output:
 
+--------------------------------------------------------------------------------+
|Volume Name      State           Last Update           Automated                |
|                                 Date/Time             LibName                  |
|---------------  --------------  --------------------  -----------------        |
|TAPE01           Not mountable    01/20/1998 14:25:22                           |
|DBTP01           Not mountable    01/20/1998 14:25:22                           |
|DBTP03           Not mountable    01/20/1998 14:31:53                           |
+--------------------------------------------------------------------------------+

Task 2

Display detailed information about all volumes at the vault.

Command:
query drmedia wherestate=vault format=detailed

Output:
+--------------------------------------------------------------------------------+
|           Volume Name: DBTP02                                                  |
|                 State: Vault                                                   |
| Last Update Date/Time: 01/20/1998 13:29:02                                     |
|              Location: Ironmnt                                                 |
|           Volume Type: DBBackup                                                |
|Copy Storage Pool Name:                                                         |
|     Automated LibName:                                                         |
|                                                                                |
+--------------------------------------------------------------------------------+

where:

Volume Name
The name of the database backup or copy storage pool volume.

State
The state of the volume.

Last Update Date/Time
The date and time that the volume was last updated.

Location
The volume location.

Volume Type
The type of volume. Possible values are:

DBBackup
A full or incremental database backup volume.

DBSnapshot
A database snapshot backup volume.

CopyStgPool
A copy storage pool volume.

Copy Storage Pool Name
For a copy storage pool volume, the name of the copy storage pool.

Automated LibName
The name of the automated library if the volume is in a library.

Related Commands

Table 166. Commands Related to QUERY DRMEDIA

Command Description
BACKUP DB Backs up the TSM database to sequential access volumes.
BACKUP STGPOOL Backs up a primary storage pool to a copy storage pool.
CHECKOUT LIBVOLUME Checks a storage volume out of an automated library.
MOVE DRMEDIA Moves DRM media onsite and offsite.
SET DRMCOPYSTGPOOL Specifies that copy storage pools are managed by DRM.
SET DRMDBBACKUPEXPIREDAYS Specifies criteria for database backup series expiration.
SET DRMCMDFILENAME Specifies a file name for containing DRM executable commands.
SET DRMFILEPROCESS Specifies whether the MOVE DRMEDIA or QUERY DRMEDIA command processes files associated with a device type of file.


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