|Oracle8i Server Installation and Database Administration Guide
Release 3 (8.1.7) for Fujitsu Siemens Computers BS2000/OSD
Part Number A95466-01
This chapter supplements the generic Oracle Server documentation set with information about:
Refer to the Oracle8i Administrator's Guide and the Oracle8i Backup and Recovery manual for detailed information about database backup and recovery.
Oracle8i's Recovery Manager offers an additional method to do backup and recovery. This chapter at first discusses previously existing methods and then Recovery Manager on BS2000/OSD.
As a security precaution, you should back up the information stored in an Oracle Server database regularly. The method you use for backing up an Oracle Server database and the frequency of backup is site-dependent.
A good approach is to establish a routine schedule. For example, you can schedule an Export immediately before or after a business activity that involves data entry, such as weekly invoicing or month-end closing of the books.
The Export utility allows you to back up or export information stored in your Oracle Server database. We strongly recommend that you export your Oracle Server database files before installing a new version of the Oracle Server.
The Oracle Server Export utility provides you with a means to backup a table, a user, or a complete database. As this utility deals with (logical) database objects, it tends to be slower than BS2000 backup utilities. However, Export provides a great deal of flexibility. As you can export individual tables, you can back up critical tables or tables with high update activity more frequently than other data.
The following steps show one way of exporting an entire Oracle Server database. For details of the other available options, refer to the Oracle8i Utilities manual.
Refer to the Oracle8i Utilities manual for more information on how you use the Export utility.
You can also back up an Oracle Server database using BS2000 operating system utilities (for example, ARCHIVE). This is often preferable when the Oracle Server database is very large and frequent exports are not practical because of time restraints.
A disk file backup of the Oracle Server database is not an alternative to an EXP in all cases. Refer to the section on "Recovering Databases" for a discussion of cases when recovery must be from an Export file.
Disk file backups are appropriate as a means of securing the Oracle Server database in case of hardware or operator failure and are a necessary part of any recovery scheme that involves the use of log files.
Use the following steps to back up an Oracle Server database using a disk backup command:
SVRMGR> CONNECT INTERNAL
SVRMGR> SELECT * FROM V$DATAFILE;
SVRMGR> SELECT * FROM V$LOGFILE;
You can perform an online backup of individual tablespaces by using either:
The ARCHIVE method is faster, and is described in this section.
Before you can perform an online ("hot") backup of individual tablespaces, you must ensure that the ARCHIVE utility can back up open files.
The BS2000 command you enter to ensure that ARCHIVE can back up open files is given below. The INSTALL.C.OPNBACK utility calls the BS2000 macro CATAL which sets the OPNBACK file attribute to YES. For the CATAL macro to work the database must be shut down or the tablespace in question must be off line. You enter this command once per file (for example, before adding it to a tablespace), not on the occasion of each backup:
You must never back up database files online without first setting the tablespace to backup mode; if you do the resulting backup files will be inconsistent. To perform an online backup of individual tablespaces or data files, use the following procedure:
There are several reasons why an Oracle Server database might need to be restored. They can include planned scenarios, such as moving to a different machine or system configuration, or migrating to a later version of the Oracle Server; and unplanned scenarios, such as the loss of an Oracle Server database. How the Oracle Server database is restored depends on backup procedures in place prior to the time the Oracle Server database requires restoration. This section discusses restoration both when a full Oracle Server database export is used, and when copies of the Oracle Server database files are used.
This section covers restoring using a full Oracle Server database export. It is assumed that you have an Export file of the entire Oracle Server database as it is to be restored, and that the Oracle Server database is shut down. Use these steps to restore an Oracle Server database:
Refer to the Oracle8i Utilities manual for more information on using the Import utility.
An Oracle Server database may also be restored offline from disk backups of the files, using the following steps.
While the Oracle Server database is running, the names of all files which it comprises can be determined by querying the table V$DATAFILE. Enter the following when the SQL prompt is displayed:
The following is displayed on your system:
File # FILENAME
2 ROWS SELECTED.
You can determine the name of the log files in a similar way:
This will result in the following being displayed on your screen:
This section provides information about log archiving on Oracle8i Release 3 for Fujitsu Siemens BS2000/OSD. It is assumed that you are familiar with the description of archiving in the Oracle8i Administrator's Guide.
Please note the following points before enabling log archiving:
For the second method, the database must be mounted but not open.
After enabling archiving, you should normally enable automatic archiving, so that the Oracle Server will archive the log files automatically at each log file switch. To enable automatic archiving, the database must be mounted but not open, and must have been set in ARCHIVELOG mode. Enter the following command:
Alternatively, you can use the initialization parameter:
which enables automatic archiving at instance startup.
You can disable Automatic archiving again by entering the following command:
Automatic archiving copies the redo log files before they are cyclically re-used; the output filename is prefixed by the value of the initialization file parameter, LOG_ARCHIVE_DEST, if specified, and suffixed by the log sequence number, identifying a single archive file.
LOG_ARCHIVE_DEST can indicate a pubset (e.g. LOG_ARCHIVE_DEST = :PUB1:) in order to direct all archived redo logs to addressable media.
We recommend that you save the archive files to tape using an appropriate BS2000 utility (such as BS2000 ARCHIVE).
Before using Recovery Manager refer to Oracle8i Backup and Recovery Guide.
On BS2000/OSD there is no support of tapes, backup media are disks only.
As a workaround you could use the Recovery Manager output as a first level storage to be 'migrated' by BS2000 subsystem HSMS (Hierarchical Storage Management System) to tapes. However, it is the administrator's responsibility to care for cooperation of the two systems.
Recovery Manager cannot run in single task-mode, you must use a two-task Net8 connection. For this purpose you can
This is an example of a Recovery Manager command: