IBM Books

API Reference

sqluhupd - Update Recovery History File

Updates the location, device type, or comment in a recovery history file entry.

Authorization

One of the following:

sysadm
sysctrl
sysmaint
dbadm

Required Connection

Database. To update entries in the recovery history file for any database other than the default database, a connection to the database must be established before calling this API.

API Include File

sqlutil.h

C API Syntax



/* File: sqlutil.h */
/* API: Update Recovery History File */
/* ... */
SQL_API_RC SQL_API_FN
  sqluhupd (
    char * pObjectPart,
    char * pNewLocation,
    char * pNewDeviceType,
    char * pNewComment,
    void * pReserved,
    struct sqlca * pSqlca);
/* ... */

Generic API Syntax



/* File: sqlutil.h */
/* API: Update Recovery History File */
/* ... */
SQL_API_RC SQL_API_FN
  sqlghupd (
    unsigned short ObjectPartLen,
    unsigned short NewLocationLen,
    unsigned short NewDeviceTypeLen,
    unsigned short NewCommentLen,
    char * pObjectPart,
    char * pNewLocation,
    char * pNewDeviceType,
    char * pNewComment,
    void * pReserved,
    struct sqlca * pSqlca);
/* ... */

API Parameters

ObjectPartLen
Input. A 2-byte unsigned integer specifying the length in bytes of the pObjectPart string.
NewLocationLen
Input. A 2-byte unsigned integer specifying the length in bytes of the pNewLocation string. Set to zero if a new location is not provided.
NewDeviceTypeLen
Input. A 2-byte unsigned integer specifying the length in bytes of the pNewDeviceType string. Set to zero if a new device type is not provided.
NewCommentLen
Input. A 2-byte unsigned integer specifying the length in bytes of the pNewComment string. Set to zero if a new comment is not provided.
pObjectPart
Input. A string specifying the identifier for the backup, restore, unload, or load copy image. This parameter has the form of a time stamp with a sequence number from 001 to 999.
pNewLocation
Input. A string specifying a new location for the backup, restore, unload, or load copy image. Setting this parameter to NULL, or pointing to zero, leaves the value unchanged.
pNewDeviceType
Input. A string specifying a new device type for storing the backup, restore, unload, or load copy image. Setting this parameter to NULL, or pointing to zero, leaves the value unchanged.
pNewComment
Input. A string specifying a new comment to describe the entry. Setting this parameter to NULL, or pointing to zero, leaves the comment unchanged.
pReserved
Reserved for future use.
pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

REXX API Syntax



UPDATE RECOVERY HISTORY USING :value

REXX API Parameters

value
A compound REXX host variable containing information pertaining to the new location of a recovery history file entry. In the following, XXX represents the host variable name:

XXX.0
Number of elements in the variable (must be between 1 and 4)

XXX.1
OBJECT_PART (time stamp with a sequence number from 001 to 999)

XXX.2
New location for the backup or copy image (this parameter is optional)

XXX.3
New device used to store the backup or copy image (this parameter is optional)

XXX.4
New comment (this parameter is optional).

Sample Programs

C
\sqllib\samples\c\rechist.c

COBOL
\sqllib\samples\cobol\rechist.cbl

FORTRAN
\sqllib\samples\fortran\rechist.f

REXX
\sqllib\samples\rexx\rechist.cmd

Usage Notes

This is an update function, and all information prior to the change is replaced and cannot be recreated. These changes are not logged.

The recovery history file is used for recording purposes only. It is not used directly by the restore or the roll-forward functions. During a restore, the location of the backup can be specified, and the history file is useful for tracking this location. The information can subsequently be provided to sqlubkp - Backup Database. Similarly, if the location of a load copy image is moved, roll-forward recovery must be informed of the new location and storage media. For additional details, see the Administration Guide and sqluroll - Rollforward Database.

See Also

sqluhcls - Close Recovery History File Scan



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

[ DB2 List of Books | Search the DB2 Books ]