C H A P T E R  6

Configuring Recovery

Sun MTP provides two methods for implementing recovery on a region-wide basis:

Because these methods are mutually exclusive, select a recovery method that best meets the needs of your application region. Each method provides the same level of recovery protection, but ease of use and performance levels differ. See Choosing a Recovery Method.

This chapter contains the following topics:


Setting Up the NRFS Partition

If you are using NRFS, you must initialize the raw disk partition and allocate the number of blocks for your recovery file or files before configuring recovery in the VCT.



Note - NRFS only supports a 4-Kbyte block size. Therefore, if you are using the NRFS method, your VSAM Catalog must be set to a 4-Kbyte block size.




procedure icon  To Set Up the NRFS Partition

1. Ask your system administrator to allocate a raw disk partition and provide you with the path name and the total number of blocks in the partition.

2. Log in to the Sun MTP host system as superuser.

3. Set your region environment by executing the region's setup file.

4. Initialize the NRFS partition and allocate a recovery file by executing the following command:

# kixnrfs -c devname -n totblks -k kixsys -s startblk -l blocks

where:

devname: Path name of the raw disk partition

totblks: Total number of blocks in the partition

kixsys: Path name of the $KIXSYS directory of the region

startblk: Starting block number

blocks: Number of blocks allocated for the region's recovery file

For example, to allocate blocks 1-500 to the finance region's recovery file, type the following command:

# kixnrfs -c /dev/dsk/r005da -n 250000 -k /users/local/trans/finance -s 1 -l 500

If you are allocating part of the partition to another region, make sure to start the second region's recovery file at block 501.

5. After initializing the raw partition and allocating recovery file space, run the kixnrfs command with the name of the raw device to get a report that you can use to set up or modify the VCT.

For example:

# kixnrfs /dev/dsk/c4t0d0s4

If this partition has two recovery files configured, the report shows information similar to the following:

CODE EXAMPLE 6-1 NRFS Report--Example
Native Recovery File System for Sun MTP version 8.0.0
 
	Starting block of this NRFS :0
	Number of blocks in this NRFS : 786433
	Number of recovery files in NRFS : 2
 
Recovery file 0:
	KIXSYS	: /users/local/trans/finance
	Starting Block	: 1
	Number of Blocks		: 524288
 
Recovery file 1:
	KIXSYS	: /users/local/trans/accounting
	Starting Block	: 524289
	Number of Blocks		: 262144

6. Set up the VCT as described in Configuring Recovery in the VCT.


Configuring Recovery in the VCT

The procedure in this section describes how to configure recovery in the VCT and how to change recovery methods. If you are using NRFS recovery, you must first perform the procedure described in Setting Up the NRFS Partition.


procedure icon  To Configure Recovery

1. Open the Table Manager and display the Standard Tables menu.

2. Press PF10 to open the VCT.

The first five fields relate to recovery.

  FIGURE 6-1 VSAM Configuration Table (VCT)

Screen shot showing the VCT.[ D ]

3. Type the recovery information:

Filename: Type the name of the recovery data file.

Env: Type the environment variable that points to the directory where the recovery data file resides.

Blocks: Type the number of blocks in the recovery file; must be greater than 100.

Offset: This value must be 0.

Raw FS device: Device name of the Native Recovery File System (NRFS).

Blocks: Number of blocks in the recovery file; must be greater than 100.

Offset: The Starting Block value on the NRFS report shown in CODE EXAMPLE 6-1.

4. Press PF2 to save the VCT.

5. Press PF3 to return to the Table Manager - Standard Tables menu.


procedure icon  To Change Recovery Methods

1. Modify the VCT by changing the values in the recovery-related fields.

2. Shut down the region.

You must ensure that Sun MTP terminates normally. See Shutting Down Sun MTP.

3. Restart the region.


Configuring Recovery on VSAM Datasets

You can selectively configure recovery on an application's KSDS and RRDS VSAM files by setting an attribute on the file's entry in the FCT. To configure recovery on ESDS VSAM files, see Configuring Recovery for ESDS Datasets.

Refer to the Sun Mainframe Transaction Processing Software Administrator's Guide for more information about managing VSAM files.


procedure icon  To Specify Recovery for KSDS and RRDS Files

1. Open the Table Manager and display the Standard Tables menu.

2. Press PF5 to open the FCT.

  FIGURE 6-2 File Control Table (FCT)

Screen shot showing the files defined in the FCT.[ D ]

3. If you are creating a new entry, follow the procedure in Defining VSAM Files in the FCT. If you are modifying an existing entry, position your cursor on the dataset name.

4. Use the Tab key to move the cursor to the No Rcv field and type N.

Recovery is enabled for the file, if recovery is enabled in the VCT.

5. Press Enter to accept the change.

6. To modify another file, repeat steps 3 through 5.

7. When you are done, press PF2 to save the FCT.

8. Press PF3 to return to the Standard Tables menu.

Configuring Recovery for ESDS Datasets

The default VSAM recovery facility is applicable only to KSDS and RRDS datasets. ESDS datasets are, by nature, entry-sequential and cannot be backed out in a dynamic transaction backout stage.

Using the ESDS recovery feature, you can mark ESDS dataset records with special tags that can be used for further processing at a later stage. These tags indicate that the records can be treated as being logically deleted. However, tagging the records does not truly indicate that the records are physically or logically deleted. Sun MTP will process them as active records during VSAM operations, as well as during export or import (unikixbld) operations.

Refer to the Sun Mainframe Transaction Processing Software Administrator's Guide if you need to specify recovery for ESDS datasets.