DB2 Server for VSE & VM: Data Restore Guide


Section 3. Installing Under VSE Guest Sharing

The procedure for installing Data Restore in a VSE Guest Sharing environment has five steps:

  1. Define the requirements for VM resources.
  2. Define the requirements for the database manager resources.
  3. Run the supplied EXECs to complete the VM installation.
  4. Define the requirements for VSE resources.
  5. Run the supplied jobs to complete the VSE installation.

Note:In a VSE Guest Sharing environment, only RELOAD with RECOVERY=NO can be executed from a VSE partition. No other Data Restore functions are available since these functions need direct access (LINK and ACCESS) to the database mini-disks. It is strongly recommended that Data Restore be installed as a VM product in a VSE Guest Sharing environment.

Step 1. Define the VM Resources

This step is mandatory.

  1. Define a new VM userid for Data Restore and ensure that it can access all of the application servers. The minimum virtual storage size for this machine is 8 MB.
  2. Allocate a minidisk of the required size (see Figure 31) to this userid. Format the minidisk (using the CMS FORMAT command) with a block size of 4 KB.

    Figure 31. Minidisk Space Calculation for Data Restore VM Installation

          3375 :       16 CYLINDERS
       3380 :       10 CYLINDERS
       3390 :        9 CYLINDERS
       9345 :       10 CYLINDERS
       FBA  :    10000 BLOCKS
    

  3. If you are using an external security manager like RACF, make sure that this machine is authorized to access the minidisks of the application server (including the directory, log, and dbextent disks) in both read and write mode. (See "Security and Authorizing Access to the Server Minidisks (VM Only)" for more information).
  4. Verify that your machine can link to the application server's 195 (production) minidisk.

Step 2. Define the Database Manager Resources

This step is mandatory.

In this step, you define the resources in the database manager so that you can run Data Restore.

You need three public dbspaces:

Using ISQL, enter the following commands:

Figure 32. Acquiring the Required Dbspaces.

(1) ---> SQLINIT DBNAME(dbname)
(2) ---> ISQL
 
(3) ---> CONNECT SQLDBA IDENTIFIED BY XXXXXXXX
(4) ---> ACQUIRE PUBLIC DBSPACE NAMED DATARFTR (PAGES=6400,PCTFREE=0,STORPOOL=n)
(5) ---> ACQUIRE PUBLIC DBSPACE NAMED DATARFT2 (PAGES=1024,PCTFREE=0,PCTINDEX=10,
         STORPOOL=n)
(6) ---> EXIT
Note:With the STORPOOL parameter, you may select either a recoverable or a nonrecoverable storage pool. Use a nonrecoverable storage pool, if possible.

Statement 1
Initializes a connection to the database with the appropriate parameters.

Statement 2
Invokes the Interactive SQL environment.

Statement 3
Signs on to the application server with DBA authority. (Replace XXXXXXXX with the connect password for SQLDBA.)

Statement 4
Acquires a required public dbspace.

Statement 5
Acquires a required public dbspace.

Statement 6
Exits the ISQL environment.

You are now ready to complete the Data Restore installation on VM.

Step 3. Complete the VM Installation Process

This process consists of four mandatory steps and two optional steps.

Step 3.1 Load Data Restore from Tape

This step is mandatory.

Log on to the Data Restore userid and execute the commands in Figure 33.

Figure 33. Loading the Installation Files

(1) ---> ACCESS cuu1 A
(2) ---> ATTACH cuu2 to * as 181
(3) ---> VMFPLC2 REW
(4) ---> VMFPLC2 LOAD
(5) ---> SQLINIT DBNAME(dbname)

Statement 1
Accesses the minidisk cuu1 that was defined in step 1 (the minidisk must already be formatted).

Statement 2
Attaches tape drive cuu2 as 181 and mounts the Data Restore tape on this drive.

Statement 3
Rewinds the tape on drive 181.

Statement 4
Loads the contents of the tape.

Statement 5
Runs the SQLINIT EXEC with the appropriate parameters to connect to the correct database.

Step 3.2 Create the Database Environment

This step is mandatory.

Run the following EXEC:

Figure 34. Creating the Database Environment

    XTS9CRE

This EXEC creates the required database environment; for example, tables used internally by the product.

When prompted, enter the appropriate SQL CONNECT statement to connect to the database as user SQLDBA, or, if the VM userid has DBA authority, press the enter key.

Step 3.3 Load the Data Restore Packages

This step is mandatory.

Run the following EXEC:

Figure 35. Loading the Data Restore Packages

    XTS9PREP

This EXEC loads the Data Restore packages into the database.

When prompted, enter the appropriate SQL CONNECT statement to connect to the database as user SQLDBA, or, if the VM userid has DBA authority, press the enter key.

Step 3.4 Create the Data Restore Modules

This step is mandatory.

Run the following EXEC:

Figure 36. Creating the Data Restore Modules

    XTS9GMOD

This EXEC creates the Data Restore executable modules XTS91001, and XTS91002. These modules are used to invoke various functions such as BACKUP, etc.

Data Restore is now installed in one application server. You may want to take a backup of your database at this point.
Note:Refer to Step 3.5 Install in Additional Application Servers if you want to install Data Restore in additional application servers in the same VM system.

Step 3.5 Define Default Values for Data Restore Parameters

This step is optional.

While using Data Restore, you can pass parameters in the SYSIN file. Instead of passing these parameters, you can modify and assemble the LMBRPARM program to specify default values for them.

Step 4. Define the VSE Resources

Refer to Section 2. Installing Under VSE for initial considerations for installing Data Restore on a VSE system.

Step 4.1 Define the Library to be Installed

This step is optional.

If the PRD2 library already exists, and there is enough space in the library to contain the Data Restore feature, skip the rest of this step and go to Step 4.5 Restore the Data Restore Distribution Library.

If you want to install Data Restore in a library created in a VSE/VSAM space, you must:

  1. Define the VSAM cluster for the VSE library using the VSAM utility IDCAMS.
  2. Prepare DLBL statements for the library.
  3. Define the VSE library and sublibrary using the library utility program LIBR.

If you want to install Data Restore in a library created in a non-VSE/VSAM space, you must:

  1. Prepare DLBL and EXTENT statements for the library.
  2. Define the VSE library and sublibrary using the library utility program LIBR.

Note:The IBM-supplied installation procedures and examples assume that Data Restore is installed in library PRD2, sublibrary RCVvrm. If you install it elsewhere make sure you change the job control statements as needed in all subsequent procedures and examples.

Step 4.2 Define a Library in VSE/VSAM Space

Refer to your VSAM manual for library cluster definitions. Figure 38 shows a job that can be used to define a VSE/VSAM library cluster.

Figure 38. Defining a VSE VSAM Library Cluster

         // JOB DEFINE VSE LIBRARY
         // EXEC IDCAMS,SIZE=AUTO
            DEFINE CLUSTER                                   -
(1) --->       (NAME(VSE.PRD2.LIBRARY)                       -
(2) --->       VOLUMES(volidn)                               -
               NONINDEXED                                    -
               RECORDFORMAT(NOCIFORMAT)                      -
               SHR(3)                                        -
(3) --->       CYL(primary secondary)                        -
(4) --->       DATA(NAME(VSE.PRD2.LIBRARY.DATA)))            -
(4) --->       CATALOG(VSAM.MASTER.CATALOG)
         /*
         /&

Statement 1
Use the cluster name VSE.PRD2.LIBRARY. If you change it here, also change it as shown in Figure 39.

Statement 2
Replace volidn with the appropriate volume identification information.

Statement 3
Use Figure 9 to determine the minimum primary and secondary VSAM space allocations (add 25% free space to allow for maintenance).

Statement 4
The data name VSE.PRD2.LIBRARY.DATA and the catalog name VSAM.MASTER.CATALOG are provided as examples. Modify them to conform to your installation's standards.

Step 4.3 Prepare the Library DLBL Statements

To define the file names of the library that will contain the Data Restore feature, prepare DLBL and EXTENT statements for the library, based on the type (VSE/VSAM or non-VSE/VSAM). One of the job streams shown in Figure 39 stores the applicable statements into the system standard subarea of the label information area. You should also add the applicable statements to the existing standard label loading procedure used in the automated system initialization (ASI) process.

Figure 39. Adding the Data Restore Library Information in the Standard Subarea

In the Standard Label Area
 
         // JOB ADDSTDL FOR VSE LIBRARY IN VSE/VSAM SPACE
         // OPTIONS STDLABEL=ADD
(1) ---> // DLBL PRD2,'VSE.PRD2.LIBRARY',,VSAM,CAT=IJSYSCT,DISP=(OLD,KEEP)
         /&
 
or
 
         // JOB ADDSTDL FOR VSE LIBRARY IN NON-VSE/VSAM SPACE
         // OPTION STDLABEL=ADD
(1) ---> // DLBL PRD2,'VSE.PRD2.LIBRARY'
(2) ---> // EXTENT volidn,1,0,xxx,yyy
         /*
         /&

Statement 1
If you change PRD2 to a different value, make the same change in all the JCL provided.

Statement 2
Provide the volume identification (volidn) and extent information (xxx,yyy) in tracks. Refer to the system control statements manual for your VSE operating system for information on how to code these values.

Step 4.4 Define the Library and Sublibrary

Use the job shown in Figure 40 to define a new VSE library and sublibrary (either BAM or VSAM). For more information about library definitions, refer to the control statements manual for your VSE system.

Figure 40. Defining a New Library and Sublibrary for Data Restore

        // JOB DEFINE LIBRARY & SUBLIBRARY
        // EXEC LIBR
           ON $RC>4 GOTO ENDJOB
(1) --->   DEFINE LIB=PRD2
           DEFINE SUBLIB=PRD2.RCVvrm  R=Y
        /.ENDJOB
        /*
        /&

Statement 1
If the library PRD2 already exists, omit the DEFINE LIB statement.

Step 4.5 Restore the Data Restore Distribution Library

This step is mandatory.

You can restore the Data Restore distribution library in one of two ways:

Figure 41. Job INSvrRCV (Using MSHP to Install Data Restore in VSE)

   // JOB INSvrRCV        INSTALL Data Restore FEATURE
   // MTC REW,cuu         *-- REWIND TAPE
   // ASSGN SYS002,cuu1   *--AUXILIARY HISTORY FILE
   // ASSGN SYS005,UA     *--NO RESTORE TO DOSRES
   // ASSGN SYS006,cuu    *--DISTRIBUTION TAPE
   // OPTION CATAL
   // EXEC MSHP
   INSTALL PRODUCT FROM TAPE ID='DB2VSE.RCV.7.1.0'- *-ACTUAL TAPE ID
   PROD IN=PRD2.RCVvrm *--IDENTIFICATION OF LIBRARIES
   DEFINE HISTORY AUX EXTENT=xxx:yyy
   /*
   // MTC RUN,cuu
   /&

Before execution, modify the above statements as follows:

cuu
Replace with the address of the tape drive.

cuu1
Replace with the address of the disk drive on which the auxiliary history file resides.

PRD2.RCVvrm
Replace with the library and sublibrary names you are using.

xxx
Replace with the starting address of the auxiliary history file (in tracks or blocks).

yyy
Replace with the size of the auxiliary history file (in tracks or blocks).

Notes:

  1. You may receive messages from MSHP. These messages are normal and can be ignored. For more details about the MSHP control statements, refer to the messages and codes manual for your VSE operating system.

  2. The remaining installation steps do not require the distribution tape.

Step 5. Complete the VSE Installation Process

This process consists of two mandatory steps and one optional step. You must do these steps in order.

Step 5.1 Link-edit the Data Restore PRDI

This step is mandatory.

To link-edit XTSOPRDI, run the job control member XTS9PRDI shown in Figure 42. This job should end with a return code of 0.

Figure 42. Job XTS9PRDI (Link-edit XTSOPRDI)

(1) ---> ..* $$ JOB JNM=XTS9PRDI,CLASS=0
         // JOB XTS9PRDI
         * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         * XTS9PRDI: Data Restore FEATURE
         *         : LINK EDIT XTSOPRDI
         * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(2) ---> // LIBDEF PHASE,CATALOG=PRD2.RCVvrm       / rcv sublibrary
(3) ---> // LIBDEF OBJ,SEARCH=PRD2.DB2vrm          / DB2 Server for VSE sublibrary
         // OPTION CATAL
(4) --->  PHASE XTSOPRDI,*
(5) --->  INCLUDE ARIPRDID
         /*
(6) ---> // EXEC LNKEDT,PARM='RMODE=24'
         /*
         /&
         ..* $$ EOJ

Statement 1
Alter the POWER statement to run the job in an appropriate class.

Statement 2
Catalogs the phase into the Data Restore library.

Statement 3
Specifies the DB2 Server for VSE & VM library.

Statement 4
The executable phase is XTSOPRDI.

Statement 5
Includes ARIPRDID to be link-edited.

Statement 6
Executes the Linkage Editor.

Step 5.2 Define the VSAM Files for Data Restore

This step is mandatory.

To define the required VSAM files, run the job control member XTS9DEF shown in Figure 43.

The job ends with a return code of 8 on first execution because the DELETE CLUSTER command is processed for clusters that do not yet exist.

Figure 43. Job XTS9DEF (Define VSAM Files)

(1) ---> ..* $$ JOB JNM=XTS9DEF,CLASS=0
         // JOB XTS9DEF
         * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         * XTS9DEF : Data Restore FEATURE
         *         : DEFINE VSAM FILES
         * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(2) ---> // DLBL IJSYSUC,'vsesp.user.catalog',,VSAM
(3) ---> // EXEC IDCAMS,SIZE=AUTO
(4) --->  DELETE DIRWORK   PURGE CLUSTER
(5) --->  DEFINE CLUSTER(NAME(DIRWORK) CYL(06)-
(6) --->          VOLUME(vvvvvv) CISZ(512) REUSE-
                       RECSZ(505 505) SHR(2) NIXD)
               DELETE LMBRWRK   PURGE CLUSTER
(7) --->  DEFINE CLUSTER(NAME(LMBRWRK) CYL(05)-
(6) --->          VOLUME(vvvvvv) CISZ(4096) REUSE-
                RECSZ(4089 4089) SHR(2) NIXD)
               DELETE LMBRLG1   PURGE CLUSTER
(8) --->  DEFINE CLUSTER(NAME(LMBRLG1) CYL(01)-
(6) --->          VOLUME(vvvvvv)  REUSE-
                        RECSZ(4096 4096) SHR(2) NIXD)
               DELETE LMBRLG2   PURGE CLUSTER
(9) --->  DEFINE CLUSTER(NAME(LMBRLG2) CYL(01)-
(6) --->          VOLUME(vvvvvv)  REUSE-
                RECSZ(4096 4096) SHR(2) NIXD)
               DELETE LMBRLG3   PURGE CLUSTER
(10) ---> DEFINE CLUSTER(NAME(LMBRLG3) CYL(01)-
(6) --->          VOLUME(vvvvvv)  REUSE-
                RECSZ(4096 32750) SHR(2) NUMBERED)
 
         /*
         /&
         ..* $$ EOJ

Statement 1
Alter the POWER statement to run the job in an appropriate class.

Statement 2
Specifies the VSE/VSAM user catalog.

Statement 3
Executes IDCAMS to define the required clusters.

Statement 4
Deletes the cluster before redefining it.

Statement 5
Defines the DIRWORK cluster. Modify the CYL parameter to match the size of the database directory disk (BDISK).

Statement 6
Replace vvvvvv with the appropriate volume identifier.

Statement 7
Define the LMBRWRK cluster to contain all of the active pages for the biggest dbspace to be reloaded with the RECOVERY=YES parameter, or the biggest dbspace containing a LONG column.

Statement 8
Define LMBRLG1 to contain all of the changes executed on the database for tables to be reloaded with the RECOVERY=YES parameter. The maximum of this cluster would be the size of the log disk; however, this is rarely required.

Statement 9
Define LMBRLG2 to contain 5 bytes per rollback LUW (logical unit of work) in the log files during the RECOVERY process.

Statement 10
Define LMBRLG3 to contain LONGVARCHAR columns for the updated rows.
Note:You can specify a secondary allocation for all of the clusters.

Step 5.3 Define Default Values for Data Restore Parameters

This step is optional.

While using Data Restore, you can pass parameters in SYSIPT by using the OPTIONS statement. Instead of passing these parameters, you can modify and assemble the LMBRPARM program to specify default values for them.

To customize your parameter defaults, punch the XTS9PARM.Z member and specify the appropriate values in the LMBRPARM macro as shown in Figure 44.

Notes:

  1. Do not change the source for the LMBRPARM macro definition. Change statement 5 only.

  2. To specify more than one parameter, separate each parameter with a comma. Assembler continuation rules apply.

Figure 44. Job XTS9PARM (Catalog Default Values)

(1) ---> ..* $$ JOB JNM=XTS9PARM,CLASS=0
         // JOB XTS9PARM
         * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         * XTS9PARM: Data Restore FEATURE
         *         : CATALOG DEFAULT VALUES
         * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(2) ---> // LIBDEF PHASE,CATALOG=PRD2.RCVvrm
(2) ---> // LIBDEF *,SEARCH=PRD2.RCVvrm
         // OPTION CATAL
(3) --->  PHASE LMBRPARM,*
         // EXEC ASSEMBLY,SIZE=512K
(4) --->          MACRO
                  LMBRPARM  &NOTA=E,&CASE=M,&DEVICE=TAPE,                   *
                     &COMMIT=0,&MSGCLAS=1,&MSGDEV=3,                        *
                     &DBAPW=SQLDBAPW,&BASE=SQL/DS V3R5,&LANG=S001,&CONFIRM=YES
                  LCLB      BIT1,&BIT2;
                  DC        CL11'&PWD'
         &BIT1    SETB      ('&DEVICE' EQ 'TAPE')
         &BIT2    SETB      ('&DEVICE' EQ 'DASD')
                  DC        AL1(&BIT1+&BIT2*2)
         &BIT1    SETB      ('&NOTA'(1,1) EQ 'E')
                  DC        AL1(&BIT1)
         &BIT1    SETB      ('&CASE'(1,1) EQ 'M')
         &BIT2    SETB      ('&CASE'(1,1) EQ 'U')
                  DC        AL1(&BIT1+&BIT2*2)
                  DC        AL4(&COMMIT)
                  DC        AL1(&MSGCLAS)
                  DC        AL1(&MSGDEV)
                  DC        CL8'&DBAPW'
                  DC        CL8'&BASE'
                  DC        CL4'&LANG'
                  DC        CL1'&CONFIRM'
                  MEND
         LMBRPARM CSECT
         * in order to customize your default table
         * modify the following statement specifying all required parameters
(5) --->          LMBRPARM  LANG=S001
                  END       LMBRPARM
         /*
         // EXEC LNKEDT,PARM='MSHP,RMODE=24'
         /*
         /&
         ..* $$ EOJ

Statement 1
Alter the POWER statement to run the job in an appropriate class.

Statement 2
Specifies the sublibrary for Data Restore.

Statement 3
Assembles and link-edits the LMBRPARM phase.

Statement 4
Defines the macro.

Statement 5
Specify your default values for any parameter defined in the LMBRPARM macro (statement 4). The defaults entered here override the installation defaults.

Refer to OPTIONS and CONTROL Statements for additional information on parameter values.


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