Browse Prior Art Database

Object Relocation File Recovery

IP.com Disclosure Number: IPCOM000109714D
Original Publication Date: 1992-Sep-01
Included in the Prior Art Database: 2005-Mar-24
Document File: 2 page(s) / 73K

Publishing Venue

IBM

Related People

Bullock, GR: AUTHOR [+5]

Abstract

A method is described which ensures that the Object Relocation File (ORF) can be recovered in the event of I/O problems and system crashes.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Object Relocation File Recovery

       A method is described which ensures that the Object
Relocation File (ORF) can be recovered in the event of I/O problems
and system crashes.

      The OS/2* Database Manager creates the Object Relocation File
(ORF) during Create Database.  This flat file contains entries for
each table object in the database.  Each entry defines the physical
location of each of the table object's files or parts.  The ORF's
name is "SQL00001.ORF".  During database initialization, the Database
Manager reads the ORF from disk and builds several linked list
structures (TOLLL) to facilitate quick access of the data during
transaction processing.

      The Database Manager relies on the contents of this file to
locate any table object.  If this file is damaged or destroyed, the
user would have to restore the database from a backup.  A method is
needed to recover from the loss of the ORF.

      The Database Manager also creates a shadow copy of the ORF
during Create Database in the main database directory.  The shadow
ORF's name is "SQL00002.ORF".  All updates are made to the primary
ORF (SQL00001.  ORF) first and then made to the shadow ORF.  If an
I/O error occurs accessing the primary ORF or if the primary ORF is
missing, it is replaced with the shadow copy and processing
continues.  Only if both the primary and shadow ORFs are damaged will
the user need to restore the database.

      The Database Manager takes the following steps when writing to
the ORFs:
1)   Truncates the Primary ORF to length 0.  If unable to open or
truncate the file, the Database Manager attempts to delete it and
then recreate it.
2)   Writes the linked lists (TOLLL) contents to the Primary ORF.
3)   Truncates th...