The QUIESCE Utility

 <  Day Day Up  >  

The QUIESCE Utility

The QUIESCE utility is used to record a point of consistency for a table space, partition, table space set, or list of table spaces and table space sets. QUIESCE ensures that all table spaces in the scope of the QUIESCE are referentially intact. It does this by externalizing all data modifications to DASD and recording log RBAs or LRSNs in the SYSIBM.SYSCOPY DB2 Catalog table, indicating a point of consistency for future recovery. This is called a quiesce point . Running QUIESCE improves the probability of a successful RECOVER or COPY .

QUIESCE inserts a row with ICTYPE='Q' into SYSIBM.SYSCOPY for each table space quiesced. Additionally, QUIESCE inserts a row with ICTYPE='Q' into SYSIBM.SYSCOPY for any indexes (defined with the COPY YES attribute) associated with the table space(s) being quiesced.

Sample JCL for the QUIESCE utility is in Listing 32.6. This will quiesce all the table spaces for the DB2 sample tables. Of course, as of DB2 V7 you could choose to use LISTDEF and TEMPLATE (as described in Chapter 30, "An Introduction to DB2 Utilities") to simplify this JCL.

Listing 32.6. QUIESCE JCL
 //DB2JOBU  JOB (UTILITY),'QUIESCE',CLASS=X,MSGCLASS=X,NOTIFY=USER //* //**************************************************************** //* //*       DB2 QUIESCE UTILITY //* //*       Step 1:  STARTUT:  Start all table spaces in the //*                table space set in utility-only mode. //*       Step 2:  QUIESCE:  Quiesce all table spaces in the //*                table space set. //*       Step 3:  STARTRW:  Start all table spaces in the //*                table space set in read/write mode. //* //**************************************************************** //* //STARTUT EXEC PGM=IKJEFT01,DYNAMNBR=20 //STEPLIB DD DSN=DSN810.DSNLOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSOUT  DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSTSIN  DD * DSN SYSTEM (DSN) -START DATABASE (DSN8D81A) ACCESS (UT) END /* //QUIESCE EXEC DSNUPROC,SYSTEM=DSN,UID='QUIESCTS',UTPROC=", //           COND=(0,NE,STARTUT) //DSNUPROC.SYSIN    DD  *     QUIESCE TABLESPACE DSN8D81A.DSN8S81C             TABLESPACE DSN8D81A.DSN8S81D             TABLESPACE DSN8D81A.DSN8S81E             TABLESPACE DSN8D81A.DSN8S81R             TABLESPACE DSN8D81A.ACT             TABLESPACE DSN8D81A.PROJ             TABLESPACE DSN8D81A.PROJACT             TABLESPACE DSN8D81A.EMPPROJA WRITE YES /* //STARTRW EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=EVEN //STEPLIB DD DSN=DSN810.DSNLOAD,DISP=SHR //* //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSOUT  DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSTSIN  DD * DSN SYSTEM (DSN) -START DATABASE (DSN8D81A) ACCESS (RW) END /* // 

QUIESCE Phases

The QUIESCE utility has three phases:

UTILINIT

Sets up and initializes the QUIESCE utility

QUIESCE

Determines the point of consistency and updates the DB2 Catalog

UTILTERM

Performs the final utility cleanup


QUIESCE Locking Considerations

The following utilities can run concurrently with QUIESCE :

CHECK DATA DELETE NO

CHECK INDEX

CHECK LOB

COPY SHRLEVEL REFERENCE (IX or TS)

DIAGNOSE

MERGECOPY

MODIFY

QUIESCE

REPORT

RUNSTATS

STOSPACE

UNLOAD

REORG TABLESPACE UNLOAD ( ONLY or EXTERNAL )

 

REPAIR LOCATE ( DUMP or VERIFY )

 

The QUIESCE utility will drain all write claim classes. If WRITE YES is specified, QUIESCE will also drain all write claim classes on an associated partitioning index (or partition), DPSIs, and any non-partitioned indexes. Concurrent read access is permitted during a QUIESCE .

QUIESCE Guidelines

Implement the following guidelines to ensure effective use of the QUIESCE utility.

Run QUIESCE Before COPY

QUIESCE all table spaces in a table space set before copying them. When QUIESCE will be run for a table space in a table space set, QUIESCE every table space in the table space set to ensure data consistency and referential integrity. Of course, if the COPY PENDING flag is on, QUIESCE will fail.

Specify the WRITE Option

Be sure to specify whether changed pages in the buffer pool are to be externalized to disk. Specifying WRITE YES will cause pages in the buffer pool to be written; specifying WRITE NO will not. The default is WRITE YES .

QUIESCE the System Databases Before Copying

QUIESCE all DSNDB01 and DSNDB06 table spaces before copying the DB2 Catalog. Before quiescing these table spaces, consider placing the databases into utility-only mode using the DB2 START command.

Only an Install SYSADM can QUIESCE the DB2 Directory and DB2 Catalog.

Use QUIESCE to Create Interim Points of Recovery

QUIESCE can be used to set up recovery points between regularly scheduled image copies. However, QUIESCE does not replace the need for image copies.

QUIESCE Table Spaces Related by Application RI

Even when table spaces are not tied together using DB2-defined referential integrity but are related by application code, use the QUIESCE utility to ensure the integrity of the data in the tables. This establishes a point of consistency for table spaces that are related but not controlled by the DBMS.

The QUIESCE utility cannot be run on a table space that has a copy pending, check pending, or recovery pending status.

Consider Quiescing Online Table Spaces While Activity Is Low

Run QUIESCE as frequently as possible for table spaces containing tables modified online. This enables the recovery of the table spaces to a point after the last full image copy if there is an error. Do not run the QUIESCE utility during very active periods, however, because it requires a share lock on all the table spaces that it processes. This means that table spaces being processed by QUIESCE cannot be modified until the QUIESCE utility completes.

Code Multiple Table Spaces per QUIESCE

When quiescing multiple table spaces, code the utility control cards with multiple table spaces assigned to one QUIESCE keyword. For example, code this

 

 QUIESCE TABLESPACE  DSN8D81A.DSN8S81C         TABLESPACE  DSN8D81A.DSN8S81D         TABLESPACE  DSN8D81A.DSN8S81E 

instead of

 

 QUIESCE TABLESPACE  DSN8D81A.DSN8S81C QUIESCE TABLESPACE  DSN8D81A.DSN8S81D QUIESCE TABLESPACE  DSN8D81A.DSN8S81E 

By coding the control cards the first way, you ensure that the quiesce point for all the table spaces is consistent. If the control cards are coded as shown in the second example, the QUIESCE utility is invoked three times, resulting in a different point of consistency for each table space. If you follow the guidelines for starting all table spaces in utility-only mode before running QUIESCE , either QUIESCE option will work. However, getting into the habit of coding the control cards as shown in the first example prevents errors if the start does not finish successfully before the QUIESCE begins to execute.

If the list of table spaces on which the QUIESCE utility is being executed exceeds 1165, it will be terminated with a return code of 8 . To QUIESCE groups of more than 1165 table spaces, follow this procedure:

  1. Stop all the table spaces before quiescing.

  2. Break the table spaces into groups of no more than 1165 table spaces each.

  3. Quiesce each group with a single QUIESCE statement. These QUIESCE s can be run in parallel to decrease the overall elapsed time.

  4. Start all the table spaces only after all QUIESCE statements have finished.

Consider Using QUIESCE at the Partition Level

The QUIESCE utility can be requested at the partition level. When it makes sense within your environment, consider using this ability to fine tune your backup and recovery strategy.

Consider Using QUIESCE with the TABLESPACESET Parameter

The TABLESPACESET parameter is used to indicate that all of the referentially related table spaces in the table space set are to be quiesced. A table space set is either a group of table spaces tied together with referential integrity or a base table space and all of its LOB table spaces. One table space name is supplied to the TABLESPACESET parameter, and DB2 identifies the rest of the table spaces in the table space set to be quiesced.

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net