.----------. V | .-LOCAL--. >>-+-/DBRECOVERY-+--+-AREA--+---areaname-+--+--------+-+-+------> '-/DBR--------' | | '-GLOBAL-' | | | '-ALL--+-------+-----------' | | '-LOCAL-' | | .--------. | | V | .-LOCAL--. | +-DB--+---dbname-+--+--------+-+-----+ | | '-GLOBAL-' | | | '-ALL--+-------+---------' | | '-LOCAL-' | | .-LOCAL-. | '-DATAGRP--datagroupname--+-------+--' >--+--------+--+-------+--------------------------------------->< '-NOFEOV-' '-NOPFA-'
Table 33 lists the environments (DB/DC, DBCTL, and DCCTL) from which the command and keywords can be issued.
Command / Keywords | DB/DC | DBCTL | DCCTL |
---|---|---|---|
/DBRECOVERY | X | X | |
AREA | X | X | |
DB | X | X | |
DATAGRP | X | X | |
GLOBAL | X | X | |
LOCAL | X | X | |
NOFEOV | X | X | |
NOPFA | X | X |
/DBRECOVERY is used to prevent transactions or programs from accessing DL/I databases, DEDBs, or DEDB areas.
The /DBRECOVERY command can be used on HALDBs. For more information see High Availability Large Database Commands
Use of the ALL parameter indicates that the command applies to all databases, even those not opened.
/DBRECOVERY closes and deallocates the databases, and unauthorizes them with DBRC. Once the database or area referenced by /DBRECOVERY is closed, the IMS log switches to the next OLDS (unless you specify the NOFEOV keyword). This switch to the next OLDS is marked as a recovery point for log archiving purposes. IMS issues a simple checkpoint.
/DBRECOVERY is supported on an RSR tracking subsystem, but only for a database readiness level (DLT) subsystem. /DBRECOVERY is used on an RSR tracking subsystem to take shadow areas and databases offline for image copy and recovery. The /DBRECOVERY command also stops online forward recovery (OFR) if it is in progress for the specified database or area.
IMS databases, DEDBs, and DEDB areas closed by the master terminal operator with the /DBRECOVERY command can be used as input to the offline IMS Database Recovery utility. The Database Recovery utility runs in a batch region.
For the results of issuing this command on a shared secondary index, see Shared Secondary Index Database Commands
The /DBRECOVERY command will not deallocate a data set if a VSAM data set hardware error occurred. Use VARY nnn,OFFLINE,FORCE to deallocate the data set (where nnn is the is the number of the device). For information on recovering VSAM data sets, see DFSMS/MVS Managing Catalogs (SC26-4914).
In an IMSplex, the output of the /DBR command is different when the command is entered through the OM API. In this case, the DFS058I message is not returned to OM. The command response returned to OM contains one or more of the following messages as appropriate to the database type and the command completion. For more information about specific messages, see IMS Version 9: Messages and Codes, Volume 1.
/START AREA can be used to reopen and reallocate the areas closed by /DBRECOVERY AREA command.
The /DBRECOVERY command for Fast Path Virtual Storage Option (VSO) areas in a z/OS data space removes the areas from the data space and forces updates to be written back to DASD.
When /DBRECOVERY DB is entered, the data sets of the databases named in the command |are closed. The /DBRECOVERY DB command dynamically deallocates the IMS databases. For DEDBs, |the randomizer is unloaded and removed from storage.
| |If a DL/I database is in use by a batch message processing region |when the /DBRECOVERY command is issued, a DFS0565I message is returned to the master terminal, the command is |ignored for the database named in the message, and processing continues |for any other databases specified in the command. The master terminal |operator must wait until the BMP ends before reissuing the /DBRECOVERY command to close the databases named in any DFS0565I messages. DEDB databases will accept the /DBRECOVERY command while actively being used by a batch message processing |region. However, all further calls to the database will receive |an FH status code.
| ||The region identified in the DFS0565I message can also be an MPP region. The error message can |be issued in order to break a potential deadlock condition between |Online Change, a /DBR, or /STA command against a database being used by the MPP and an application |running in the MPP issuing an ICMD or CMD call.|
| ||The /START DB command is used to reallocate the databases closed by the /DBRECOVERY |DB command except for HALD DB partitions. A HALDB partition |can be reallocated if the partition has either EEQEs, was previously |authorized but not allocated, or the OPEN keyword was used. HALDB |partitions are allocated at first reference. For DEDBs, a /START DB command also causes a reload of the randomizer.|
| |For DBCTL, when CCTL schedules a PSB, the DBCTL thread SCHED |request defines the thread as LONG or SHORT. If |the database is currently scheduled to a LONG thread, the command |is rejected; otherwise, the thread is allowed to "complete" before |the database is acted upon. This results in either a commit point |or transaction termination.
| | |On an RSR tracking subsystem, /DBR DB for a DEDB is not permitted.
DATAGRP is valid on active and RSR tracking subsystems.
Related Reading: See Group Parameters for more information on defining data groups.
Recommendation: Although you can use DBDS groups as well as database groups for this command, you should use database groups whenever possible to eliminate the overhead of converting the DBDS group to a database group.
The GLOBAL keyword and the ALL parameter are mutually exclusive. The /DBRECOVERY command will be rejected if both GLOBAL and ALL are specified. The IRLM must be active when the GLOBAL keyword is used. If IRLM is not active, the command is rejected.
If the GLOBAL keyword on a command is entered from an OM API, the command should only be routed to one IMS system in the IMSplex. The IMS that receives the command from OM will make DBRC calls to update the RECON with GLOBAL status. It will also request IRLM NOTIFY to route and process the command on sharing IMS systems, and then process the command locally.
Messages produced on the NOTIFIED systems will appear only on the system console and will not be routed back to the OM API which originally entered the command.
If multiple IMS systems have been explicitly specified in the route list, the master IMS system will process the command as described previously. However, the non-master IMS systems, to which OM routes the command, will reject the command with the return and reason codes in Table 34
Return Code | Reason Code | Meaning |
---|---|---|
X'00000004' | X'00001000' | The command contained the GLOBAL keyword and was routed to more than one IMS system in the IMSPLEX. The non-master IMS systems will reject this command when OM routes the command to them. The master IMS system will process this command and use IRLM NOTIFY to route and process the command on the non-master IMS systems. See the discussion under the GLOBAL keyword. |
Restriction: When the GLOBAL keyword is specified, the command is performed for the named database only. If the command is to be performed for a HIDAM database and its index, both must be named.
The GLOBAL keyword is not supported for an RSR tracking subsystem. The GLOBAL keyword cannot be combined with the DATAGROUP keyword.
Recommendation: Before starting the database or area, reissue this command without the NOPFA keyword to inform DBRC of the change in status for the database or area.
Entry ET:
/DBRECOVERY AREA ALL
Response ET:
DFS058I DBRECOVERY COMMAND IN PROGRESS DFS0488I DBRECOVERY COMMAND COMPLETED. AREA=DBAREA0 DFS0488I DBRECOVERY COMMAND COMPLETED. AREA=DBAREA1
Explanation: DEDB areas are being stopped for inquiry and update, closed, and deallocated; the output log is switched to the next OLDS.
Entry ET:
/DBRECOVERY DATABASE SKILL
Response ET:
DFS058I DBRECOVERY COMMAND IN PROGRESS DFS2500I DATABASE SKILL SUCCESSFULLY DEALLOCATED DFS0488I DBRECOVERY COMMAND COMPLETED. DBN=SKILL RC=0 DFS3257I ONLINE LOG NOW SWITCHED FROM DFSOLP( ) TO DFSOLP( ) DFS944I *CHKPT 82123/121314**SIMPLE**
Explanation: The new OLDS is used to record a simple checkpoint at 121314 (time) on 82123 (Julian date). The checkpoint number is 82123/121314. All /DBRECOVERY command functions are complete. The Database Recovery utility can be executed after archiving. Currently executing application programs are being terminated. When the termination completes, the SKILL database is stopped for inquiry and update, closed, and deallocated; the output log is switched to the next OLDS. /START DATABASE must be used to start the database after the recovery job completes.
This example shows how to stop an online forward recovery (OFR) at the RSR tracking site with a /DBRECOVERY command.
Entry ET (on tracking subsystem):
/DISPLAY DATABASE OFR
Response ET (to tracking subsystem):
DATABASE TYPE TOTAL UNUSED TOTAL UNUSED ACC CONDITIONS BE2PCUST DL/I EX ALLOCS OFR BE3ORDER DL/I EX ALLOCS OFR BE3ORDRX DL/I EX ALLOCS OFR BE3PARTS DL/I EX ALLOCS OFR BE3PSID1 DL/I EX ALLOCS OFR *91240/132406* SYS3
Entry ET (on tracking subsystem):
/DBRECOVERY DATABASE BE3ORDER BE3PSID1
Response ET (to tracking subsystem):
DFS058I DBRECOVERY COMMAND IN PROGRESS DFS0488I DBR COMMAND COMPLETED. DBN=BE3ORDER. RC=0 DFS0488I DBR COMMAND COMPLETED. DBN=BE3PSID1. RC=0
Explanation: Databases BE3ORDER and BE3PSID1 are closed, unallocated, and unauthorized with DBRC. Online forward recovery for the databases is also stopped.
This example shows how /DBRECOVERY command might look when entered from the SPOC.
TSO SPOC input:
DBR DB BANKATMS BANKTERM BANKLDGR BE3ORDER
TSO SPOC output:
SYS3 DFS0488I DBR COMMAND COMPLETED. DBN= BANKATMS RC=04 SYS3 DFS0488I DBR COMMAND COMPLETED. DBN= BANKTERM RC=04 SYS3 DFS0488I DBR COMMAND COMPLETED. DBN= BANKLDGR RC=04 SYS3 DFS0488I DBR COMMAND COMPLETED. DBN= BE3ORDER RC= 0 IMS3 DFS0488I DBR COMMAND COMPLETED. DBN= BANKATMS RC=04 IMS3 DFS0488I DBR COMMAND COMPLETED. DBN= BANKTERM RC=04 IMS3 DFS0488I DBR COMMAND COMPLETED. DBN= BANKLDGR RC=04 IMS3 DFS0488I DBR COMMAND COMPLETED. DBN= BE3ORDER RC= 0
OM API input:
CMD (DBR DB BANKATMS BANKTERM BANKLDGR BE3ORDER)
OM API output:
<?xml version="1.0"?> <!DOCTYPE imsout SYSTEM "imsout.dtd"> <imsout> <ctl> <omname>OM1OM </omname> <omvsn>1.1.0</omvsn> <xmlvsn>1 </xmlvsn> <statime>2002.197 21:52:02.730359</statime> <stotime>2002.197 21:52:03.383199</stotime> <staseq>B7EFBE716A9770A4</staseq> <stoseq>B7EFBE7209F9FD2F</stoseq> <rqsttkn1>USRT005 10145202</rqsttkn1> <rc>0200000C</rc> <rsn>00003008</rsn> </ctl> <cmderr> <mbr name="SYS3 "> <typ>IMS </typ> <styp>DBDC </styp> <rc>00000014</rc> <rsn>00005050</rsn> </mbr> <mbr name="IMS3 "> <typ>IMS </typ> <styp>DBDC </styp> <rc>00000014</rc> <rsn>00005050</rsn> </mbr> </cmderr> <cmd> <master>SYS3 </master> <userid>USRT005 </userid> <verb>DBR </verb> <kwd>DB </kwd> <input>/DBR DB BANKATMS BANKTERM BANKLDGR BE3ORDER </input> </cmd> <msgdata> <mbr name="SYS3 "> <msg>DFS0488I DBR COMMAND COMPLETED. DBN= BANKATMS RC=04</msg> <msg>DFS0488I DBR COMMAND COMPLETED. DBN= BANKTERM RC=04</msg> <msg>DFS0488I DBR COMMAND COMPLETED. DBN= BANKLDGR RC=04</msg> <msg>DFS0488I DBR COMMAND COMPLETED. DBN= BE3ORDER RC= 0</msg> </mbr> <mbr name="IMS3 "> <msg>DFS0488I DBR COMMAND COMPLETED. DBN= BANKATMS RC=04</msg> <msg>DFS0488I DBR COMMAND COMPLETED. DBN= BANKTERM RC=04</msg> <msg>DFS0488I DBR COMMAND COMPLETED. DBN= BANKLDGR RC=04</msg> <msg>DFS0488I DBR COMMAND COMPLETED. DBN= BE3ORDER RC= 0</msg> </mbr> </msgdata> </imsout>
Explanation: The DBR command is routed from OM to the two active IMSs -- SYS3 and IMS3. The response from both IMSs is returned to OM. The databases BANKATMS, BANKTERM, BANKLDGR, and BE3ORDER are taken offline at both IMSs.