HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Chapter 6 Backup and Recovery

Choosing an Approach to Backup and Recovery

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

When you configure the DBEnvironment, it runs with nonarchive logging by default. This is appropriate for data definition and table loading, since nonarchive logging results in more efficient loading, and usually there is little or no risk of data corruption.

After data definition and before doing the initial backup, you should decide which kind of backup, recovery, and logging you want to use for production. If you choose nonarchive logging, you should do a static backup using the SQLUtil STORE command. For archive logging, you should choose one of the following:

  • If you have TurboSTORE software, do a concurrent backup using the SQLUtil STOREONLINE command.

  • If you do not have TurboSTORE, issue the following SQL statements in single user mode in ISQL:

    isql=> BEGIN ARCHIVE;
    
    isql=> COMMIT ARCHIVE;
    

    Then immediately exit from ISQL and issue the SQLUtil STORE command.

Choosing Nonarchive Logging

If you choose nonarchive logging, you should back up the entire DBEnvironment at frequent intervals. Then, in the event of a media failure, you can restore the DBEnvironment from the most recent backup and manually enter all transactions that took place from the time of backup to the time of the failure. This approach makes sense if you use the DBEnvironment mainly for read operations, or if you process only a small number of transactions. With nonarchive logging, you do not back up the log files.

NOTE: You cannot use the SQLUtil STOREONLINE command for DBEnvironment backups if you want to retain nonarchive logging. For backups of the DBEnvironment in nonarchive logging mode, use only the SQLUtil STORE command.

Choosing Archive Logging

If you choose archive logging, you create a backup of the entire DBEnvironment at periodic intervals (say, once a week) and back up the log files at shorter intervals (say, every day). In the event of a media failure, you restore the DBEnvironment first, and then you can apply each of the stored log files in chronological sequence to the restored copy of the DBEnvironment until you have rolled forward all completed transactions. If you wish, you can roll forward to a particular time prior to the crash by supplying a timestamp for recovery.

Archive logging affords the greatest security for the DBEnvironment. If you choose archive logging, it is best to place the log on a device that is different from any of the devices that contain other DBEnvironment files. For the greatest security, use dual logging with the two logs on different devices.

Since nonarchive logging is the default, you must explicitly turn archive logging on. If you have TurboSTORE software, the SQLUtil STOREONLINE command lets you perform the STORE without stopping the DBEnvironment; and it sets archive logging mode on for all subsequent activity until you decide to turn it off with a START DBE NEWLOG statement (omitting the ARCHIVE option).

NOTE: Normally, you use the STOREONLINE command for DBEnvironment backups if you want to use archive logging. If your MPE/iX system does not have the TurboSTORE enhancements, you must use the SQLUtil STORE command instead. The complete procedure for this alternate approach is presented in a later section, "Static Backup Procedures in Archive Mode."
Feedback to webmaster