Browse Prior Art Database

Conditional Container Reuse for Database and Tablespace Restore

IP.com Disclosure Number: IPCOM000118342D
Original Publication Date: 1996-Dec-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 2 page(s) / 81K

Publishing Venue

IBM

Related People

Comeau, AC: AUTHOR [+2]

Abstract

Database data in DB2 is stored in "containers". Containers are abstractions to a device context. The container type maps directly to a storage type. For example, directories, files, and raw DASD are all supported container mappings.

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

Conditional Container Reuse for Database and Tablespace Restore

      Database data in DB2 is stored in "containers".  Containers are
abstractions to a device context.  The container type maps directly
to a storage type.  For example, directories, files, and raw DASD are
all supported container mappings.

      DB2 version 2.1.x databases are comprised of a collection
of tablespaces.  Tablespaces are an abstraction for holding table
data.  Each tablespace has a list of containers associated with it
where all of the table data for the tablespaces is stored.

      When restoring database or tablespace data, these containers
must exist.  When restoring a backup image to a new database or after
a database has been dropped, then the containers associated with the
tablespaces will not exist and will need to be recreated.  However,
in many cases a user may restore a backup image onto an existing
on-disk database.  In such cases, when restoring to an on-disk
database, the tablespaces and their containers may already exist.

      This invention provides a method for reusing database storage
containers during restore of a backup image.  During Restore,
existing containers are examined for their integrity and
characteristics. Viable  containers are reused, saving the
performance overhead of recreation. If  the containers fail the reuse
conditions, they are removed and fresh containers are created.

      If the on-disk containers for a tablespace being restored are a
superset of those required by the image being restored, and if the
set of containers required by the restored image are all reusable,
then we  choose to reuse the on-disk containers and delete any
on-disk containers  that are not used by the restore image.

      By reusing these containers, we avoid the effort of destroying
them and recreating them.  For certain kinds of containers, this
will result in a restore-time performance improvement of about two
times.  This is extremely significant since restoration of large
databases or large tablespaces is time consuming.

The following assumption is checked prior to determining container
re-use:
  o  We are restoring over an existing on-disk database.

After checking the above assumption, reuse logic for each tablespace
being restored provides:
  1.  If performing a full database restore, then drop any on-disk
       tablesp...