volume. This will improve response times for subsequent requests to the same tape volume, but may cause an additional processing overhead if the tape has to be dismounted prior to the task allocating a different tape volume (as required in task selection criterion (3) above). Refer to page 40 for a description of the RETAINTAPE parameter.

Note that the above retrieval processing is performed for each migrated row which is referenced via an SQL SELECT command. Where multiple migrated rows are referenced via a single SQL SELECT command and a program cursor used to process the resulting result table, each SQL FETCH command referencing a migrated row will cause a retrieval request to be passed to the control region. This may generate substantial tape handling activity, and result in extended response times in order to access all referenced rows.

On completion of the SQL command, a standard SQL return code will be passed back to the program indicating the success of the request. This can be checked by the program using standard SQL error handling. A return code of 0 indicates that the retrieval request was performed successfully. Any error encountered during the DB2 Manager migrated row retrieval process will generate an SQL error code of –652. Fields SQLERRD(6) and SQLERRD(7) in the SQLCA will contain additional codes indicating the cause of the error.

SQL UPDATE processing

A request from an application to update a migrated row (via an SQL UPDATE request) will cause the row to be retrieved from the Archive Manager database as described for SQL SELECT processing above.

An updated row will then be stored back in the DB2 table (i.e.) the row will be migrated from Archive Manager back to DB2. All reference to the original migrated row will be removed, causing that row to be “orphaned”. The logical record containing this row will be unreferenced. However, the object containing the logical record may contain other active migrated rows, so will continue to exist in the Archive Manager database. The object containing the restored row will be deleted by the DB2 Manager database housekeeping utility when it no longer contains any active migrated rows. Refer to chapter 6 for a description of this utility. Database tape and disk space occupied by the deleted object may be reclaimed, if required, using the Archive Manager object management and database maintenance utilities. Refer to the Archive Manager User Manual for information on this procedure.

Updated rows will become eligible once again for migration from DB2 to Archive Manager, under control of the migration criteria input to the DB2 Manager table migration utility. On migration, the updated row will be written to a different object in the same Archive Manager database as the originally migrated row.

DB2 Manager User Guide

49

StorageTek Proprietary

 

Page 52
Image 52
StorageTek 312564001 manual SQL Update processing