DB2 Server for VSE & VM: Data Restore Guide


Section 1. Installing Under VM

The procedure for installing this feature in a VM environment has three steps. You must do these steps in order.

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

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 10) to this userid. Format the minidisk (using the CMS FORMAT command) with a block size of 4 KB.

    Figure 10. 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 database manager resources so that you can run Data Restore.

You need three public dbspaces:

Using ISQL, enter the following commands:

Figure 11. 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.

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 12.

Figure 12. 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 13. 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 14. 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 15. 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, for example.

Data Restore is now installed in one application server. You may want to take a backup of your database at this point.

Step 3.5 Install in Additional Application Servers

This step is optional.

If you want to install Data Restore in additional application servers on the same VM system, repeat the following steps:

Step 3.6 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.

Starting Data Restore in a VM Environment

The CMS minidisk on which Data Restore is installed should be linked and accessed.
Note:Link the minidisk with an address different from the minidisk of the application server to avoid LINK errors during operation.

You can use a REXX EXEC like the one in Figure 17 to execute the Data Restore functions.

Figure 17. Example EXEC to Execute Data Restore Functions

/**/
'FILEDEF ARCHIV TAP1 SL 1 (RECFM VB BLOCK 32760'
'FILEDEF SYSPRINT DISK BACKUP SYSPRINT A'
'FILEDEF SYSIN DISK BACKUP SYSIN A'
'XTS91001'

The SYSIN specifies which function to process. In Figure 17, the SYSIN file starts Data Restore to execute a BACKUP command in a VM environment.


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