Administrator's Reference
This command only applies to environments licensed to use the ADSM Disaster
Recovery Manager (DRM) feature.
Use the QUERY DRMEDIA command to display information about disaster
recovery volumes. Disaster recovery volumes include database backup and
copy storage pool volumes.
Privilege Class
Any administrator can issue this command.
Syntax
.-*---------.
>>-Query DRMedia---+-----------+-------------------------------->
'-volname---'
.-WHERESTate--=--All------------------.
>----+-------------------------------------+-------------------->
'-WHERESTate--=--+-----------------+--'
+-All-------------+
+-MOuntable-------+
+-NOTMOuntable----+
+-COUrier---------+
+-VAult-----------+
+-VAULTRetrieve---+
+-COURIERRetrieve-+
'-REmote----------'
>----+---------------------+--+-------------------+------------->
'-BEGINDate--=--date--' '-ENDDate--=--date--'
>---+---------------------+--+-------------------+-------------->
'-BEGINTime--=--time--' '-ENDTime--=--time--'
.-DBBackup--=--Yes------.
>---+----------------------------+--+-----------------------+--->
'-COPYstgpool--=--poolname---' '-DBBackup--=--+-Yes-+--'
'-No--'
.-Format--=--Standard------.
>----+--------------------------+------------------------------->
'-Format--=--+-Standard-+--'
+-Detailed-+
'-Cmd------'
>----+------------------------------+--------------------------->
'-WHERELOCation--=--location---'
>----+---------------------------------------------------------+>
'-CMd--=--"string substitution string substitution ..."---'
.-APPend--=--No-------.
>----+----------------------------+--+---------------------+---><
'-CMDFilename--=--filename---' '-APPend--=--+-No--+--'
'-Yes-'
Parameters
- volname
- Specifies the name of the database backup and copy storage pool volumes to
be queried. This parameter is optional. You can use a
pattern-matching expression to specify this name. All matching volumes
are considered for processing. If you do not specify this parameter,
all database backup volumes and all copy storage pool volumes associated with
the copy storage pools defined by SET DRMCOPYSTGPOOL are considered for
processing if COPYSTGPOOL is not specified with QUERY DRMEDIA command.
- WHEREState=statevalue
- Specifies the state of volumes to be processed. This parameter is
used to restrict processing to volumes that have the specified state.
This parameter is optional. The default is ALL. Possible values
are:
- All
- Specifies that volumes in all states are to be queried. The valid
states are: MOUNTABLE, NOTMOUNTABLE, COURIER, VAULT, VAULTRETRIEVE,
COURIERRETRIEVE, and REMOTE.
- MOuntable
- Specifies that volumes that are currently in the MOUNTABLE state are to be
queried. Volumes in the MOUNTABLE state contain valid data and are
accessible for onsite processing.
- NOTMOuntable
- Specifies that volumes that are currently in the NOTMOUNTABLE state are to
be queried. Volumes in the NOTMOUNTABLE state are onsite, contain valid
data, and not accessible for onsite processing.
- COUrier
- Specifies that volumes that are currently in the COURIER state are to be
queried. Volumes in the COURIER state are with the courier and being
moved to an offsite location.
- VAult
- Specifies the volumes that are currently in the VAULT state are to be
queried. Volumes in the VAULT state are offsite, contain valid data,
and are not accessible for onsite processing.
- VAULTRetrieve
- Specifies that volumes that are currently in the VAULTRETRIEVE state are
to be queried. Volumes in the VAULTRETRIEVE state do not contain valid
data and are at the offsite vault.
- COURIERRetrieve
- Specifies that volumes that are currently in the COURIERRETRIEVE state are
to be queried. Volumes in the COURIERRETRIEVE state are with the
courier and being moved back to the onsite location.
- REmote
- Specifies that volumes that are currently in the REMOTE state are to be
queried. Volumes in the REMOTE state contain valid data and are located
at the offsite remote server.
- BEGINDate=date
- Specifies the beginning date used to select volumes for query
processing. This parameter is optional. Volumes are considered
eligible if the MOVE DRMEDIA command has transitioned the state of the volume
on or after the specified date. The default is the earliest date for
which volume information exists. Possible values are:
- MM/DD/YYYY
- Specifies that you want to query volumes that were transitioned into their
current state on or after a specific date, using MM/DD/YYYY format (for
example, 01/31/1997).
- TODAY
- Specifies that you want to query volumes that were transitioned into their
current state today.
- TODAY-numdays or -numdays
- Specifies that you want to query volumes that were transitioned into their
current state beginning with a date determined by today minus a specific
number of days. The maximum value for the number of days is
9999.
For example, to move volumes beginning with records transitioned into their
current state a week ago, you can specify TODAY-7 or simply -7.
- ENDate=date
- Specifies the ending date used to select volumes for query
processing. This parameter is optional. Volumes are considered
eligible if the MOVE DRMEDIA command has transitioned the state of the volume
on or before the specified date. The default is the current
date. Possible values are:
- MM/DD/YYYY
- Specifies that you want to query volumes that were transitioned into their
current state on or before a specific date, using MM/DD/YYYY format (for
example, 01/31/1997).
- TODAY
- Specifies that you want to query volumes that were transitioned into their
current state ending with today.
- TODAY-numdays or -numdays
- Specifies that you want to query volumes that were transitioned into their
current state ending with a date determined by today minus a specific number
of days. The maximum value for the number of days is 9999.
For example, to query volumes beginning with records transitioned into
their current state a week ago, you can specify TODAY-7 or simply -7.
- BEGINTime=time
- Specifies the beginning time used to select volumes for query
processing. This parameter is optional. Volumes are considered
eligible if the MOVE DRMEDIA command has transitioned the state of the volume
on or after the specified time and date. The default is midnight
(00:00:00) on the date specified with the BEGINDATE
parameter. Possible values are:
- HH:MM:SS
- Specifies that you want to query volumes that were transitioned into their
current state on or after a specific time on the specified date, using
HH:MM:SS format (for example, 12:33:28).
- NOW
- Specifies that you want to query volumes that were transitioned into their
current state beginning with the current time on the specified begin
date.
- NOW+numhours:numminutes or
+numhours:numminutes
- Specifies that you want to query volumes that were transitioned into their
current state beginning with a time determined by the current time plus a
specific number of hours (and, optionally, minutes) on the specified
date.
- NOW-numhours:numminutes or
-numhours:numminutes
- Specifies that you want to query volumes that were transitioned into their
current state beginning with a time determined by the current time minus a
specific number of hours (and, optionally, minutes) on the specified
date.
- ENDTime=time
- Specifies the ending time used to select volumes for query
processing. This parameter is optional. Volumes are considered
eligible if the MOVE DRMEDIA command has transitioned the state of the volume
on or before the specified time and date. The default is
23:59:59. Possible values are:
- HH:MM:SS
- Specifies that you want to query volumes that were transitioned into their
current state on or before a specific time on the specified date, using
HH:MM:SS format (for example, 12:33:28).
- NOW
- Specifies that you want to query volumes that were transitioned into their
current state beginning with the current time on the specified begin
date.
- NOW+numhours:numminutes or
+numhours:numminutes
- Specifies that you want to query volumes that were transitioned into their
current state ending with a time determined by the current time plus a
specific number of hours (and, optionally, minutes) on the specified
date.
- NOW-numhours:numminutes or
-numhours:numminutes
- Specifies that you want to query volumes that were transitioned into their
current state ending with a time determined by the current time minus a
specific number of hours (and, optionally, minutes) on the specified
date.
- COPYstgpool=poolname
- Specifies the name of the copy storage pool that is used to limit the
selection of volumes for processing. This parameter is optional.
You can use a pattern-matching expression to specify this name. All
volumes associated with the matching storage pool are considered for
processing. The copy storage pools specified with this parameter
override the copy storage pools 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 considered for
processing. See SET DRMCOPYSTGPOOL command for processing the volumes
in the MOUNTABLE state.
- DBBackup=dbvalue
- Specifies whether database backup volumes are included in the selection of
volumes for processing. This parameter is optional. The default
is to consider database backup volumes for processing. Possible values
are:
- Yes
- Specifies to consider database backup volumes for processing.
- No
- Specifies to not consider database backup volumes for processing.
- Format=formatvalue
- Specifies how the information is displayed. This parameter is
optional. The default value is STANDARD. Possible values
are:
- Standard
- Specifies that partial information is displayed for the disaster recovery
media.
- Detailed
- Specifies that complete information is displayed for the specified
disaster recovery media.
- Cmd
- Specifies that executable commands are to be built for the disaster
recovery media processed by QUERY DRMEDIA command. The executable
command syntax is specified with the CMD parameter and the commands built by
QUERY DRMEDIA will be in the file specified by CMDFILENAME, in the file name
specified by SET DRMCMDFILENAME, or in the file name generated by QUERY
DRMEDIA. If you want the commands to be displayed on the console only,
specify a "" for the CMDFILENAME. If a FORMAT=CMD is specified but no
command string is specified with CMD parameter, QUERY DRMEDIA command will not
be performed.
- WHERELOcation=location
- Specifies the location of the volumes to be displayed. This
parameter is optional. This parameter is used to restrict processing to
volumes that are in the specified location. The maximum length of the
location is 255 characters. The location must be enclosed in quotation
marks if it contains any blank characters. By specifying a target server name, DRM will display all database
backup volumes and copy storage pool volumes located on the target
server.
- CMd="string substitution string substitution
..."
- Specifies the creation of executable commands. This parameter is
optional. You must enclose your command specification in quotation
marks. The maximum length of the command specification is 255
characters. For each volume successfully processed by the QUERY
DRMEDIA, DRM writes the associated commands to a file. The filename
used by DRM is specified with the CMDFILENAME parameter, the SET
DRMCMDFILENAME command, or the default name generated by the QUERY DRMEDIA
command. If the length of the command written exceeds 240 characters,
it is split into multiple lines and a continuation character, +, is added to
all but the last line of the command. You may need to alter the
continuation character according to the requirements of the product that
executes the commands.
If you do not specify CMD or specify a "" for CMD, QUERY DRMEDIA will not
generate any executable commands. If an executable command string is
specified with the FORMAT other than CMD, the executable command string
specification is ignored and QUERY DRMEDIA command will not write any
executable command line.
- string
- Specifies the string to build an executable command to process the volume
name and/or volume location obtained by QUERY DRMEDIA command. You can
specify any free form text for the string. Do not use embed quotation
marks. For example, the following is a valid executable command
specification:
CMD="CHECKIN LIBVOL LIBONE &VOL STATUS=SCRATCH"
The following is an invalid executable command specification:
CMD=""CHECKIN LIBVOL LIBONE" &VOL STATUS=SCRATCH""
- substitution
- Specifies a substitution variable to tell QUERY DRMEDIA to substitute a
value for the variable. The possible substitution variables are:
- &VOL
- Specifies the volume name is to be substituted for &VOL. You
can specify lowercase characters, &vol. No spaces or blanks are
allowed between ampersand, &, and VOL. If there are spaces or
blanks between ampersand and VOL, QUERY DRMEDIA will treat them as strings and
no substitution will be set. If &VOL is not specified, no volume
name is set in the executable command.
- &LOC
- Specifies the volume location is to be substituted for &LOC.
You can specify lowercase characters, &loc. No spaces or blanks are
allowed between ampersand, &, and LOC. If there are spaces or
blanks between ampersand and LOC, QUERY DRMEDIA will treat them as strings and
no substitution will be set. If &LOC is not specified, no location
name is set in the executable command.
- &VOLDSN
- Specifies the file name, that the server writes into the sequential access
media labels, is to be substituted for &VOLDSN. 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 ADSM221 defined with the device class is
ADSM221.DBB. If &VOLDSN is not specified, no volume file
name is set in the executable command.
- &NL
- Specifies the new line character is to be substitued for &NL.
When &NL is specified, QUERY DRMEDIA command will split the command at the
position where the &NL is and will not append any continuation
character. The user is responsible for specifying the proper
continuation character before the &NL if one is required. The user
is also responsible for the length of the line written. If the &NL
is not specified and the length of the command line exceeds 240, the command
line is split into multiple lines and a continuation character, +, is added to
all but the last line of the command.
- CMDFilename=filename
- Specifies the fully qualified file name that will contain the commands
specified with CMD parameter when FORMAT=CMD is specified. This
parameter is optional. If you do not specify any file name with
CMDFILENAME, the file name specified with SET DRMCMDFILENAME will be
used. If you do not specify a file name with the SET DRMCMDFILENAME,
QUERY DRMEDIA will generate a file name by appending the
'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 ADSM server process. If you specify a "" for the
CMDFILENAME, the commands built are displayed on the console only. If
desired, you can re-direct the commands displayed to a file using
'>' or '>>' provided by the system.
QUERY DRMEDIA automatically creates the file name specified or
generated. See the APPEND parameter for information to determine
whether to open the file in append mode. If the QUERY DRMEDIA command
fails after the command file has been created, the file is not deleted.
- APPend=appendvalue
- Specifies whether to open the command file in append mode. This
parameter is optional. The default is NO. Possible values
are:
- No
- Specifies to write the data from the beginning of the command file.
If the given command file exists, its contents are destroyed.
- Yes
- Specifies to open the command file in append mode for writing at the end
of 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/1997 14:25:22 |
|DBTP01 Not mountable 01/20/1997 14:25:22 |
|DBTP03 Not mountable 01/20/1997 14:31:53 |
| |
+--------------------------------------------------------------------------------+
where:
- Volume Name
- Specifies the name of the database backup or copy storage pool
volume.
- State
- Specifies the state of the database backup or copy storage pool
volume.
- Last Update Date/Time
- Specifies the volume transition date/time
- Automated LibName
- Specifies the automated library name if the volume is in the library
Task 2
Display in full detail all volumes located at the vault.
- Command:
- query drmedia wherestate=vault format=detailed
- Output:
-
+--------------------------------------------------------------------------------+
| Volume Name: DBTP02 |
| State: Vault |
| Last Update Date/Time: 01/20/1997 13:29:02 |
| Location: Ironmnt |
| Volume Type: DBBackup |
|Copy Storage Pool Name: |
| Automated LibName: |
| |
| Volume Name: TAPE3S |
| State: Vault |
| Last Update Date/Time: 01/20/1997 13:29:02 |
| Location: Ironmnt |
| Volume Type: DBBackup |
|Copy Storage Pool Name: |
| Automated LibName: |
| |
+--------------------------------------------------------------------------------+
where:
- Volume Name
- Specifies the name of the database backup or copy storage pool
volume.
- State
- Specifies the state of the database backup or copy storage pool
volume.
- Last Update Date/Time
- Specifies the volume transition date/time
- Location
- Specifies where the database backup or copy storage pool volume is
stored.
- Volume Type
- Specifies the type of volume. Possible values are:
- DBBackup
- The volume is a database backup volume.
- CopyStgPool
- The volume is a copy storage pool volume.
- Copy Storage Pool Name
- Specifies the name of the copy storage pool where the volume is associated
if the volume type is CopyStgPool.
- Automated LibName
- Specifies the automated library name if the volume is in the library
Related Commands
Table 132. Commands Related to QUERY DRMEDIA
Command
| Description
|
BACKUP DB
| Backs up the ADSM 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 command processes files associated
with a device type of file.
|
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]