The database administrator creates SESAM backup copies using the utility statement COPY. He/she can create the backup copies on disk or on magnetic tape cartridge using ARCHIVE or HSMS. When doing this it is important, for security reasons, to make sure that the SESAM backup copies are not located on the same disk as the database's catalog space and user spaces.
Selecting the backup unit
You can choose any of the following SESAM backup copies:
The whole SESAM/SQL database.
If you choose this option, the database's catalog space and all user spaces are backed up at the same time.The database's catalog space
Single user space
A space set (a backup unit consisting of a number of different user spaces)
A space set is identified by a time stamp, which is included with each user-space entry in the RECOVERY_UNITS catalog table. The time stamp indicates the point in time at which the copy was created; this time must be the same for all user spaces in a space set. Spaces with the same time stamp are created by a backup with a COPY CATALOG statement or when a number of spaces are backed up by a joint COPY statement.
When choosing a backup unit, the database administrator should take the following into account:
The time it takes to create the copy.
The time it takes to create the copy depends on the volume of data to be backed up.The time required for repair or reset.
The time required to perform a repair depends on the volume of data in the SESAM backup copy to be read in and the scope of the changes that have been made since the backup was made. The time required for reset depends purely on the volume of data in the SESAM backup copy to be read in.When selecting a space set, care must be taken to ensure that no relationships that are verified by SESAM/SQL exist between the user spaces in the space set in question and user spaces outside the space set (e.g. referential integrity, indexes). The same applies to an individual user space.
The space requirements for SESAM backup copies.
The space requirements depend on the volume of data to be backed up.When using COPY CATALOG, it is possible to exclude spaces from the backup if they simultaneously meet both the following conditions:
The spaces are pure index spaces and
logical data saving is deactivated for these spaces.
In the case of RECOVER CATALOG .. GENERATE INDEX ON NO LOG INDEX SPACE, no backups are read in for these spaces. Instead they are reset and recreated.
Specifying the times at which SESAM backup copies are to be made
The times at which SESAM backup copies are to be created are chosen on the basis of
the backup plan tailored specifically to the database application by the database administrator
the accomplishing of specific database maintenance functions in connection with which the creation of a backup copy is appropriate or, in certain cases, a necessity.
Creating SESAM backup copies in accordance with the backup plan
Generally, the database administrator periodically creates SESAM backup copies of the whole database, the catalog space, space sets and individual user spaces.
When choosing the period between two consecutive backups of the same backup unit, the database administrator should base his/her choice on aspects such as the time required to create a backup copy (which depends on the volume of data in the backup unit). For example, one might perform a backup of the whole of the database once a month, and backups of space sets and user spaces on a weekly basis.
Additional factors with a bearing on the backup period are the frequency with which changes are made, as well as the speed with which the data is available again after an error situation (i.e. short repair times). The database administrator therefore usually back up user spaces that are changed frequently and need to be recovered quickly more often than other user spaces.
Creating SESAM backup copies in connection with maintenance functions
When certain kinds of database maintenance task are carried out, it makes sense (or is, indeed, essential) to create SESAM backup copies of the database or the relevant user spaces. The exact situations in which this applies are described in the relevant sections.
Immediately following the execution of the utility statement CREATE CATALOG, the database administrator should create a SESAM backup copy of the catalog space as an initial resumption point for any repair measures that might prove necessary. Similarly, a SESAM backup copy of the relevant user space should be created after the execution of every CREATE SPACE statement, because the recovery of a user space without an appropriate SESAM backup copy is only possible in connection with the repair of the whole database.
BS2000 file name for the SESAM backup copies
The names of the SESAM backup copies are as follows:
for catalog space: user_id.catalog.CATALOG.version
for user spaces: user_id.catalog.space.version
for the CAT-REC file: user_id.catalog.CAT-REC.COPY
user_id | BS2000 user ID |
catalog | name of the database for which the catalog space or user space was |
space | name of the backed up user space |
version | version number |
The version number is a six-digit integer. The first SESAM backup copy of the catalog space is numbered 000002. The version number for backup copies of the catalog space is incremented by one each time a new backup copy of the catalog space is created. The version number of the first SESAM backup copy of any user space is 000001, and is incremented by one for each new backup copy of the user space in question. Gaps may occur in the continuous numbering sequence if COPY statements are rejected because of error.
When a SESAM backup copy of the whole database or a space set is created, the SESAM backup copies of user spaces created in the process may be assigned different version numbers. Each SESAM backup copy of a relevant user space is given the appropriate nexthighest version number.
When the catalog space is backed up the CAT-REC file is automatically backed up as well. The CAT-REC copy name does not contain a version number. This means that the file is overwritten each time COPY CATALOG[_SPACE] is used.
Read accesses to SESAM backup copies
The user can read-access a SESAM backup copy of a complete SESAM/SQL database under a separate DBH. This reduces the workload on the current session with the original database.
The user can add the SESAM backup copy to the SQL database catalog with the aid of the ADD-SQL-DB-CATALOG-ENTRY statement. This is done by specifying the number of the SESAM backup copy of the catalog space in the COPY-NUMBER operand.
Only DML read access is permitted, i.e. utility statements are not permitted either. The SESAM backup copy which is read accessed remains available without any changes for recoveries that may become necessary at some later stage.