Previous | Table of Contents | Next |
A database backup represents your data, and it can be used to reconstruct lost information. Backup includes important database components such as control file, datafiles, and archive logs. In case of a media failure, the database backup can be a life saver. Oracle8 enhances the support of backup and recovery operations by kernel integration of the backup and recovery operations, and also through the introduction of a toolRecovery Manager.
Recovery Manager provides an interactive interface to backup and recovery operations by means of a character or GUI front-end with its own command language. Recovery Manager can be used for creating, managing, and restoring the backups of a database, while maintaining superior performance and high availability of the database.
Recovery Manager has several features:
Note:
In Oracle8.0.4, Legato is provided as the default media manager.
When using the Recovery Manager in Oracle8, the recovery process for the entire database or part of it is very straightforward, because the RMAN can restore the appropriate backups and archive logs as needed.
Information about the backups and the archived logs is placed in a recovery catalog. The recovery catalog is a set of database objects that stores information related to the entire backup and recovery activities performed against the database(s).
The following things should be considered when using a recovery catalog:
Note:
For smaller databases, there is a RMAN mode that allows the recovery catalog to be optional and gets all the needed information from the control file. When in this mode the following operations are not possible:
- Point-in-time recovery
- Automatic recovery when the control file is not current
Note:
The Enterprise backup utility is not supported in Oracle8.
Note:
See Oracle Bulletin 108898.604, titled Automating Cold Backups on Windows NT, for examples of a script-based approach.
Oracle8 provides three ways of taking database backups:
Recovery Manager allows commands to perform the following:
Using Recovery ManagerExamples
Before using RMAN with the recovery catalog and a particular target database, you need to perform the following tasks:
Note:
The target database should at least be mounted. In addition, a unique number that is generated internally, called db identifier, is used to identify the database.
Before issuing a backup, restore, copy, or recovery command, a channel must be allocated that sets up a connection from RMAN to a target database instance by starting a server process on a target database. The type of I/O device that will be used is also specified during channel allocation. It is important to note that each allocate channel command uses a separate connection to the target database, and multiple backup sets or file copies can be read or written in parallel.
Examples of Backup and Restore Using RMAN
The following is an example of database backup (except offline tablespaces):
run{ allocate channel dev1 type sbt_tape; backup skip offline (database format %d_%u); }
The following is an example of backing up a tablespace:
run{ allocate channel dev1 type disk; backup (tablespace system, tablespace1, tablespace2 format /oracle/backups/%d_%u); }
The following is an example of backing up a datafile:
run{ allocate channel dev1 type disk; backup (datafile $ORACLE_HOME/dbs/user1.dbf format %d_%u); }
The following is an example of restoring a datafile:
run{ allocate channel dev1 type sbt_tape; sql alter tablespace tablespace1 offline immediate; restore tablespace tablespace1; recover tablespace tablespace1; sql alter tablespace tablespace1 online; release channel dev1; }
Previous | Table of Contents | Next |