Need a quick method to convert from VCAT to STOGROUP defined or consolidate extents without the REORG outage
search cancel

Need a quick method to convert from VCAT to STOGROUP defined or consolidate extents without the REORG outage

book

Article ID: 27566

calendar_today

Updated On:

Products

Database Analyzer for DB2 for z/OS Database Management for DB2 for z/OS - Administration Suite Database Management for DB2 for z/OS - Performance Suite Database Management for DB2 for z/OS - Recovery Suite Database Management for DB2 for z/OS - SQL Performance Suite Database Management for DB2 for z/OS - Utilities Suite DATABASE MANAGEMENT SOLUTIONS FOR DB2 FOR Z/OS

Issue/Introduction

Need a quick method to convert from VCAT to STOGROUP defined consolidate extents without the REORG outage?

Resolution

One important issue to start thinking about is Db2 objects using VCAT defined objects as opposed to STOGROUP defined objects.
These objects will have to be converted sooner or later in order to exploit some of the new features available in Db2 8 and Db2 9.

Another issue many Db2 users experience from time to time is related to tablespaces and indexes reaching an "out of extent" situation,
or the need to consolidate extents without the outage from a Reorganization - or even move the pageset to a specific volume for performance reasons.

Database Analyzer for Db2 for z/OS (PDA) offers a unique method to assist in both of these scenarios, using a high speed data movement mechanism
while also taking care of the necessary catalog updates - and even more important, automatic fallback if "something goes wrong".

The steps needed to accomplish these tasks are:

    1. From the Db2 Products Main Menu, specify option D (Database Analyzer), and then pick option D (Dataset Facility).
    2. Specify the object type and object name and press ENTER, where after the object details are listed (volume, allocation quantities and the storage group or VCAT name.
    3. Simply overwrite what needs to be changed (e.g. the new volume, the storage group or the new primary/secondary quantity), and press ENTER.
    4. The commands to execute the change are created, so simply hit ENTER for online execution or specify B for MODE Batch.
    5. The first set of control cards illustrates PRIQTY and SECQTY has been set to 2000 and 4000 for partition 3 of tablespace SYSCOLTS in DSNDB04.The seconds set of control cards illustrates the control cards generated for converting tablespace=S0705033 from VCAT defined to STOGROUP defined.
1.   ********************************* TOP OF DATA **************************
2.   .CALL DFLMOVE INDDN(PTIIN) OUTDDN(PTIPRINT)                              
3.   .DATA                                                                    
4.               SSID(DXXX) TABLESPACE(DSNDB04.SYSCOLTS) PART(3)                      
5.               VCAT(DXXX)                                                           
6.               PRIQTY(2000)                                                           
7.               SECQTY(4000)                                                           
8.   .ENDDATA                                                                 
9.   .SYNC 5     'MOVE TABLESPACE(DSNDB04.SYSCOLTS) PART(3)'                  
10.  ******************************** BOTTOM OF DATA ************************
11.         
12.  ********************************* TOP OF DATA *********************************
13.  .CALL DFLMOVE INDDN(PTIIN) OUTDDN(PTIPRINT)                                     
14.  .DATA                                                                           
15.              SSID(DXXX) TABLESPACE(D0705033.S0705033)                                    
16.              VCAT(DXXX)                                                                  
17.              USING(SG,SYSDEFLT)                                                          
18.  .ENDDATA                                                                        
19.  .SYNC 5     'MOVE TABLESPACE(D0705033.S0705033)'                                
20.  ******************************** BOTTOM OF DATA *******************************
  1. The steps performed during the execution is (where x represents the dataset number):

    1. The object is stopped
    2. The necessary ALTER command(s) are executed so the catalog reflects the changes.
    3. IDCAMS define of a new cluster (with Node=Y000x) using the original dataset as MODEL (after making sure this VSAM dataset doesn't exist)
    4. The content of the original VSAM dataset (Node=A000x) is copied to the new dataset (Node=Y000x).
    5. The original datasets (Node=A000x) are renamed to Node=Z000x.
    6. The new datasets (Node=Y000x) are renamed to Node=A000x.
    7. What was the original datasets (Node=A000x now renamed to Node=Z000x) are then deleted.
    8. The execution is committed and the object is started again in RW mode.

The purpose of the renaming process is done in order to provide automatic fallback in case the process should fail.