Oracle8i Backup and Recovery Guide Release 8.1.5 A67773-01 |
|
This chapter describes how to manage the RMAN metadata. Depending on how you implement RMAN, you can store this data either in the recovery catalog or exclusively in the control file. The chapter includes the following topics:
To use a recovery catalog, you need to set up the schema. Oracle suggests you put the recovery catalog schema in its own tablespace; however, you can put it in the SYSTEM tablespace if necessary.
Install the recovery catalog schema in a different database from the target database you will be backing up. If you do not, the benefits of using a recovery catalog are lost should you lose the database and need to restore.
Assume the following for the examples below:
catalog.sql
and catproc.sql
have successfully run.
See Also: To learn how to connect to RMAN, see "Connecting to RMAN". To learn about the advantages and disadvantages of maintaining a recovery catalog, see "Deciding Whether to Use a Recovery Catalog".
SQL> CONNECT sys/change_on_install@rcat
SQL> SPOOL create_rman.log
SQL> CREATE USER rman IDENTIFIED BY rman 2> TEMPORARY TABLESPACE temp 3> DEFAULT TABLESPACE rcvcat 4> QUOTA UNLIMITED ON rcvcat;
SQL> GRANT recovery_catalog_owner TO rman;
SQL> GRANT connect, resource TO rman;
create_rman.log
file for any errors before continuing. For example, a UNIX user can issue:
SQL> host % vi create_rman.log
% rman catalog rman/rman@rcat log = create_rman.log
You can also connect from the RMAN prompt:
% rman log = create_rman.log RMAN> connect catalog rman/rman@rcat
RMAN> create catalog tablespace rcvcat;
create_rman.log
file for any errors before continuing. For example, a UNIX user might issue:
RMAN> host; % vi create_rman.log
See Also: For create catalog command syntax, see "createCatalog". For the SQL syntax for the GRANT and CREATE USER statements, see the Oracle8i SQL Reference.
This section describes how to manage the RMAN information repository. It assumes that you are using a recovery catalog. If you use a control file as the exclusive repository for RMAN metadata, most RMAN maintenance commands will work. See "Consequences of Using the Control File for RMAN Metadata" for a list of catalog-only commands.
This section includes the following topics:
Before using RMAN with a target database, register the target database in the recovery catalog. If you do not, RMAN cannot use the recovery catalog to store information about the target database. RMAN obtains all information it needs to register the target database from the database itself. You can register more than one target database in the same recovery catalog.
% rman target / catalog rman/rman@rcat
startup mount;
register database;
catalog datafilecopy 'filename';
For an Oracle7 backup to be usable for recovery in database of a later version, it must have been part of a tablespace that was offline normal or read-only when the database was migrated. See "Cataloging O/S Backups".
log1
etc. refers to the fully specified filename for an archived log):
catalog archivelog 'log1', 'log2', 'log3', ... 'logN';
Oracle uses an internal, uniquely generated number called the db identifier to distinguish one database from another. Oracle generates this number when you create the database.
Typically, each database has a unique identifier; however, an exception occurs with databases that you create by copying files from an existing database (instead of using a CREATE DATABASE statement). In such cases, RMAN detects the duplicate database identifiers and the register database command fails. Avoid this problem by using the duplicate command, which copies the database from backups and generates a new database identifier.
If a failure occurs because of duplicate database identifiers, you can create a second recovery catalog in another user's schema by re-executing the create catalog command using a different Oracle userid. Then, you can register the database with a duplicate database identifier into the newly created recovery catalog in the new schema.
See Also: For register command syntax, see "register". For catalog command syntax, see "catalog". For duplicate command syntax, see "duplicate". For issues relating to database migration, see Oracle8i Migration.
RMAN allows you to unregister a database as well as register it. Make sure this procedure is really what you intend, because afterwards RMAN can longer recover all the backups for that database.
DBID
value that is displayed when you use RMAN to connect to your target database. For example, enter:
% rman target sys/change_on_install@prod1 nocatalogRMAN-06005: connected to target database: RMAN (DBID=1231209694)
SQL> SELECT db_key, db_id FROM db WHERE db_id = 1231209694;
This query should return exactly one row.
DB_KEY DB_ID ---------- ---------- 1 1237603294 1 row selected.
SQL> EXECUTE dbms_rcvcat.unregisterdatabase(db_key, db_id)
For example, enter:
SQL> EXECUTE dbms_rcvcat.unregisterdatabase(1 , 1237603294)
Before you can use RMAN again with a target database that you have opened with the RESETLOGS option, notify RMAN that you have reset the database incarnation. The reset database command directs RMAN to create a new database incarnation record in the recovery catalog. This new incarnation record indicates the current incarnation. RMAN associates all subsequent backups and log archiving done by the target database with the new database incarnation.
If you issue the ALTER DATABASE OPEN RESETLOGS command but do not reset the database, then RMAN will not access the recovery catalog because it cannot distinguish between a RESETLOGS command and an accidental restore of an old control file. By resetting the database, you inform RMAN that the database has been opened with the RESETLOGS option.
In the rare situation in which you wish to undo the effects of opening with the RESETLOGS option by restoring backups of some prior incarnation of the database, use the reset database to incarnation key command to change the current incarnation to an older incarnation.
list incarnation;List of Database Incarnations DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time ------- ------- ------- ------ --- ---------- ---------- 1 2 PROD1 1224038686 NO 1 02-JUL-98 1 582 PROD1 1224038686 YES 59727 10-JUL-98
reset database to incarnation 2;
run { allocate channel ch1 type disk; restore database; recover database; sql "ALTER DATABASE OPEN RESETLOGS"; }
See Also: For reset database command syntax, see "reset". For list command syntax, see "list".
The unavailable option provides for cases when a backup or copy cannot be found or has migrated offsite. A file that is marked unavailable will not be used in a restore or recover command. If the file is later found or returns to the main site, then you can mark it available again by using the available operand. Note that you do not need to allocate a channel of type maintenance for this operation.
change datafilecopy '/oracle/backup/cf_c.f' unavailable; change backupset 12 unavailable;
change datafilecopy '/oracle/backup/cf_c.f' available; change backupset 12 available;
See Also: For change command syntax, see "change".
Because backups and copies can disappear from disk or tape or become corrupted, the RMAN metadata repository can contain outdated information. To ensure that data about backup sets and image copies in the recovery catalog or control file is synchronized with corresponding data on disk or in the media management catalog, perform a crosscheck.
Use either the change ... crosscheck or crosscheck backup command to check the specified files. Note that these commands do not delete O/S files or remove metadata records; you must use separate commands for those operations.
The following table explains the difference between the crosscheck commands:
See Also: To learn how to delete files and update metadata records, see "Deleting Backups and Copies and Updating Their Status in the RMAN Metadata". For crosscheck command syntax, see "crosscheck".
Use the crosscheck feature to check the status of a backup on disk or tape. If the backup is on disk, the change backupset ... crosscheck and crosscheck backup commands determine whether the header of the backup piece is valid; if on tape, the commands simply check that the backups exist.
If a backup piece is unreadable or absent, then RMAN marks the backup piece expired in the output of the list command and the recovery catalog views. If it was marked expired but is now available, RMAN marks the backup piece as available in the output of the list command and the recovery catalog views.
Use change backupset ... crosscheck when you want to provide a list of backup sets or pieces to check; use crosscheck backup when you wish to restrict the crosscheck to a specified device type, object type, or date range and let RMAN generate the list of backup sets or pieces.
allocate channel for maintenance type 'sbt_tape';
list backup;
RMAN> change backupset 1338, 1339, 1340 crosscheck;RMAN-03022: compiling command: change RMAN-08074: crosschecked backup piece: found to be 'EXPIRED' RMAN-08517: backup piece handle=/oracle/dbs/2eafnuj3_1_1 recid=77 stamp=352057957 RMAN-08074: crosschecked backup piece: found to be 'AVAILABLE' RMAN-08517: backup piece handle=/oracle/dbs/2dafnuj2_1_1 recid=78 stamp=352057957 RMAN-08074: crosschecked backup piece: found to be 'AVAILABLE' RMAN-08517: backup piece handle=/oracle/dbs/2fafnuj3_1_1 recid=79 stamp=352057960
If a backup set is no longer available, RMAN marks it as expired. If it was marked expired and is now available, RMAN marks it available.
release channel;
allocate channel for maintenance type 'sbt_tape';
For example, check all backups of datafile tbs_8.f
over the last six months:
crosscheck backup of datafile "/oracle/dbs/tbs_8.f" completed after 'SYSDATE-180';
If a backup set is no longer available, RMAN marks it as expired. If it was marked expired and is now available, RMAN marks it available.
release channel;
Use the change ... crosscheck command to determine whether image copies of datafiles, control files, or archived redo logs on disk or tape are valid. If RMAN is unable to find the specified image copy or archived redo log, it updates its status to deleted. Query the relevant recovery catalog view to see copies and logs with deleted status.
Note that RMAN considers archived redo logs as image copies. If for some reason one or more archived redo logs becomes unavailable, issue a change archivelog all crosscheck command so that RMAN will mark the absent logs as deleted. You do not need to use a recovery catalog to execute this command.
% rman target / nocatalog % rman target / catalog rman/rman@rcat
list copy of database archivelog all;List of Datafile Copies Key File S Completion time Ckp SCN Ckp time Name ------- ---- - --------------- ---------- ---------- ------ 1262 1 A 18-AUG-98 219859 14-AUG-98 /oracle/dbs/copy/tbs_01.fList of Archived Log Copies Key Thrd Seq S Completion time Name ------- ---- ------- - --------------- ------------------------------------ 789 1 1 A 14-JUL-98 /oracle/work/arc_dest/arcr_1_1.arc 790 1 2 A 11-AUG-98 /oracle/work/arc_dest/arcr_1_2.arc 791 1 3 A 12-AUG-98 /oracle/work/arc_dest/arcr_1_3.arc
change datafilecopy 1262 crosscheck;RMAN-03022: compiling command: change RMAN-06154: validation succeeded for datafile copy RMAN-08513: datafile copy filename=/oracle/dbs/copy/tbs_01.f recid=1 stamp=351194732
If RMAN is unable to validate the copy, you will see:
RMAN-06153: validation failed for datafile copy
% rman target / nocatalog % rman target / catalog rman/rman@rcat
change archivelog all crosscheck;
See Also: For crosscheck command syntax, see "crosscheck". For change command syntax, see "change". For list command syntax, see "list".
You can use RMAN to delete backups and copies and update their status in the control file or recovery catalog to deleted status. Note that backup and copies with deleted status do not appear in the list command output: query the recovery catalog views instead.
Following are typical scenarios:
See Also: For change command syntax, see "change". For delete command syntax, see "deleteExpired". For descriptions of the recovery catalog views, see Chapter 12, "Recovery Catalog Views".
allocate channel for maintenance type disk;
datafile 1
:
change controlfilecopy '/oracle/backup/cf_c.f' uncatalog; change datafilecopy '/oracle/backup/df_1_c.f' uncatalog;
release channel;
This procedure does not require the use of a recovery catalog.
list backup of database archivelog all; # lists backups of database files and logs list copy;
allocate channel for delete type 'sbt_tape';
change backuppiece 101 delete; change controlfilecopy 63 delete;
release channel;
This procedure requires the use of a recovery catalog.
allocate channel for delete type disk;
delete expired backup;
release channel;
list copy;
change controlfilecopy '/oracle/backup/cf_c.f' uncatalog; change datafilecopy 4833 uncatalog;
Note that change ... uncatalog does not remove files from the O/S; it only removes recovery catalog records.
SQL> SELECT cdf_key, status FROM rc_datafile_copy WHERE cdf_key = 4833; CDF_KEY S ---------- - 0 rows selected.
To remove all copy or backup records from the recovery catalog (without physically deleting the backups or copies):
You can remove all recovery catalog records of deleted backups and copies at once using the $ORACLE_HOME/rdbms/prgrmanc.sql
script. Only perform this operation if you do not want a historical record of what you have backed up.
See Also: For change command syntax, see "change".
allocate channel for maintenance type 'sbt_tape';
change backupset 100, 101, 102, 103 delete;
release channel;
% sqlplus rman/rman@rcat
prgrmanc.sql
script, which is stored in the $ORACLE_HOME/rdbms/admin
directory:
SQL> @prgrmanc.sql
RMAN will remove all records with status deleted from the recovery catalog.
allocate channel for maintenance type 'sbt_tape';
change backupset 100, 101, 102, 103 delete;
release channel;
% sqlplus rman/rman@rcat
SQL> SELECT * FROM rc_database_incarnation;
key_value
is the value of DBINC_KEY:
SQL> DELETE FROM dbinc WHERE dbinc_key=key_value;
RMAN will remove the specified incarnation records from the recovery catalog.
See Also: For more information about the RC_DATABASE_INCARNATION recovery catalog view, see "RC_DATABASE_INCARNATION".
A restore validation executes a restore test run without actually restoring the files. Test the restore of the entire database or individual tablespaces, datafiles, or control files. The restore ... validate and validate backupset commands test whether you can restore backups or copies. You should use:
See Also: For restore command syntax, see "restore". For validate command syntax, see "validate".
SQL> SELECT status FROM v$instance;STATUS ------- OPEN 1 row selected. SQL> STARTUP FORCE MOUNT;
% rman target / catalog rman/rman@rcat
list backupset; list copy;
run { allocate channel ch1 type disk; allocate channel ch2 type tape; restore controlfile validate; restore tablespace 'system' validate; restore archivelog all validate; }
RMAN-06026: some targets not found - aborting restore
If you see an error message stack and output similar to the following, for example, then there is a problem with the restore of the specified file:
RMAN-03002: failure during compilation of command RMAN-03013: command type: restore RMAN-03007: retryable error occurred during execution of command: IRESTORE RMAN-07004: unhandled exception during command execution on channel c1 RMAN-10035: exception raised in RPC: ORA-19505: failed to identify file "oracle/dbs/1fafv9gl_1_1" ORA-27037: unable to obtain file status SVR4 Error: 2: No such file or directory Additional information: 3 RMAN-10031: ORA-19624 occurred during call to DBMS_BACKUP_RESTORE.RESTOREBACKUPPIECE
If you do not see an error stack, then RMAN successfully validated the files.
% rman target / catalog rman/rman@rcat
list backup of database archivelog all;
run { allocate channel ch1 type disk; validate backupset 1121; }
RMAN-08024
message then RMAN successfully validated the restore of the specified backup set.
RMAN-03022: compiling command: allocate RMAN-03023: executing command: allocate RMAN-08030: allocated channel: ch1 RMAN-08500: channel ch1: sid=10 devtype=DISK RMAN-03022: compiling command: validate RMAN-03023: executing command: validate RMAN-08016: channel ch1: starting datafile backupset restore RMAN-08502: set_count=47 set_stamp=346169465 creation_time=08-OCT-98 RMAN-08023: channel ch1: restored backup piece 1 RMAN-08511: piece handle=/vobs/oracle/dbs/1faa483p_1_1 params=NULL RMAN-08024: channel ch1: restore complete RMAN-08031: released channel: ch1
A stored script is a sequence of RMAN commands stored within the recovery catalog. It provides a common repository for frequently executed collections of RMAN commands.
For example, you can collect the RMAN commands needed to perform nightly backups into a single script called nightly_bkup
. Storing the script in the recovery catalog instead of in an O/S text file has the advantage that it is accessible to any DBA using RMAN, regardless of which machine RMAN is executed upon.
RMAN allows you to:
% rman catalog rman/rman@rcat
create script b_whole{ allocate channel ch1 type disk; allocate channel ch2 type disk; backup database;sql 'ALTER SYSTEM ARCHIVE LOG ALL';
backup archivelog all; }
RMAN-08085
, the script was successfully created and stored in the recovery catalog:
RMAN-03022: compiling command: create script RMAN-03023: executing command: create script RMAN-08085: created script b_whole
% rman target / catalog rman/rman@rcat
run { execute script b_whole; }
See Also: For execute script command syntax, see "run".
% rman target / catalog rman/rman@rcat
b_whole
with the following:
replace script b_whole { allocate channel ch1 type 'sbt_tape'; backup database; }
See Also: For replace script command syntax, see "replaceScript".
% rman catalog rman/rman@rcat
delete script 'b_whole';
See Also: For delete script command syntax, see "deleteScript".
rman_log
:
% rman target / catalog rman/rman@rcat log rman_log
print script b_whole;
RMAN> host; % vi rman_log
See Also: For replace script command syntax, see "printScript".
% sqlplus rman/rman@rcat
SQL> SELECT script_name FROM rc_stored_script; SCRIPT_NAME -------------------------------------------------------------------------------- backupdb binc binc1 3 rows selected.
See Also: For information about the RC_STORED_SCRIPT view, see "RC_STORED_SCRIPT".
When RMAN performs a resynchronization, it compares the recovery catalog to either the current control file of the target database or a backup control file and updates it with information that is missing or changed.
Resynchronizations can be full or partial. In a partial resynchronization, RMAN reads the current control file to update changed information, but does not resynchronize metadata about the database physical schema: datafiles, tablespaces, redo threads, rollback segments (only if the database is open), and online redo logs. In a full resynchronization, RMAN updates all changed records, including those for the database schema.
When resynchronizing, RMAN creates a snapshot control file, compares the recovery catalog to the snapshot, and updates the catalog with information that is missing or changed. RMAN performs partial or full resynchronizations automatically as needed when you execute certain commands (see "resync" for more information). To ensure a full resynchronization, issue a resync catalog command.
This section contains the following topics:
Table 6-1 describes the types of records that RMAN resynchronizes.
RMAN automatically performs full or partial resynchronizations as needed in certain situations. Execution of the following commands performs a full or partial resynchronization (depending on whether the schema metadata has changed) automatically when the target database control file is mounted and the recovery catalog database is available when the command is executed:
Perform manual resynchronizations in the following scenarios.
If the recovery catalog is unavailable when you issue backup or copy commands, then open the catalog database later and resynchronize it manually using the resync catalog command.
If you are running in ARCHIVELOG mode, resynchronize the recovery catalog regularly because the recovery catalog is not updated automatically when a redo log switch occurs or when a redo log is archived. Instead, Oracle stores information about log switches and archived redo logs in the control file. You must propagate this information periodically into the recovery catalog.
How frequently you resynchronize the recovery catalog depends on the rate at which Oracle archives redo logs. The cost of the operation is proportional to the number of records in the control file that have been inserted or changed since the previous resynchronization. If no records have been inserted or changed, then the cost of resynchronization is very low. Thus, you can perform this operation frequently--for example, hourly--without incurring undue costs.
Resynchronize the recovery catalog after making any change to the physical structure of the target database. As with redo log archive operations, the recovery catalog is not updated automatically when a physical schema change is made.
A physical schema change occurs when you:
When resynchronizing from the current control file, RMAN automatically detects the records in the control file that have been updated and resynchronizes only those records. If the target database is open, then RMAN also updates information about rollback segments in the recovery catalog (this information is used for TSPITR).
When resynchronizing from a backup control file, RMAN does not verify that the backup pieces or file copies actually exist. Thus, you may need to use the change ... crosscheck and crosscheck commands to remove records for files that no longer exist.
Issue the resync catalog command to force a full resynchronization of the recovery catalog.
SQL> STARTUP pfile=initRCAT.ora
% rman target sys/change_on_install@prod1 catalog rman/rman@rcat
startup mount;
resync catalog;RMAN-03022: compiling command: resync RMAN-03023: executing command: resync RMAN-08002: starting full resync of recovery catalog RMAN-08004: full resync complete
See Also: For resync catalog command syntax, see "resync".
The recovery catalog is dependent on the target database control file for information. Consequently, the currency of the information in the control file determines the effectiveness of the recovery catalog.
The size of the target database's control file grows depending on the number of:
You can use the CONTROL_FILE_RECORD_KEEP_TIME parameter to specify the minimum number of days that Oracle keeps this information in the control file. Entries older than the number of days specified are candidates for overwrites by newer information. The larger the CONTROL_FILE_RECORD_KEEP_TIME setting, the larger the control file.
At a minimum, resynchronize your recovery catalog at intervals less than the CONTROL_FILE_RECORD_KEEP_TIME setting, because after the number of days specified in this parameter, Oracle will overwrite the information in the control file with the most recently created information. If you have not resynchronized the recovery catalog, and Oracle has overwritten the information, then this information cannot be propagated to the recovery catalog.
See Also: For more information about the CONTROL_FILE_RECORD_KEEP_TIME parameter, see the Oracle8i Reference. For more information about managing control files for backup and recovery, see "Managing the Control File". For more detailed information on all aspects of control file management, see the Oracle8i Administrator's Guide.
You can make RMAN aware of the existence of file copies that are created via means other than RMAN. This section contains the following topics:
If you do not make backups or image copies by using RMAN commands, then the recovery catalog has no record of them. You must manually notify RMAN when you make backups with an O/S utility. Use the RMAN catalog command to:
Catalog backups whenever:
Whenever you make a cold O/S backup, e.g., by using the UNIX cp command to copy a datafile, make sure to catalog it. Oracle8i supports the ALTER TABLESPACE BEGIN/END BACKUP command, which allows open database O/S backups. Although RMAN does not create such backups, you can add them to the recovery catalog so that RMAN is aware of them.
For a backup to be cataloged, it must be:
For example, if you store datafiles on mirrored disk drives, you can create an O/S copy by breaking the mirror. In this scenario, use the catalog command to notify RMAN of the existence of the operating system copy after breaking the mirror. Before reforming the mirror, issue a change ... uncatalog command to notify RMAN that the file copy is being deleted.
RMAN cannot catalog Oracle7 files, except in the following special circumstances. During the migration from Oracle7 to Oracle8i, you shut down your Oracle7 database cleanly prior to running the migration utility. At this time, you can take O/S backups of your Oracle7 datafiles and catalog the backups with RMAN: Oracle accepts them because no redo from the old database is required to recover them. RMAN can then restore those backups in your Oracle8i database if no other backups exist.
Following is a scenario that generates an Oracle7 backup that you can catalog with RMAN:
The pre-migration backups are identical to the backups that would be taken prior to migration, and may also be cataloged with RMAN.
Use the catalog command to propagate information about O/S backups to the recovery catalog.
% cp $ORACLE_HOME/dbs/sales.f $ORACLE_HOME/backup/sales.bak';
% rman target change_on_install@prod1 catalog rman/rman@rcat
catalog datafilecopy '$ORACLE_HOME/backup/sales.bak'; RMAN-03022: compiling command: catalog RMAN-03023: executing command: catalog RMAN-08050: cataloged datafile copy RMAN-08513: datafile copy filename=/oracle/backup/sales.bak recid=121 stamp=342972501 RMAN-03023: executing command: partial resync RMAN-08003: starting partial resync of recovery catalog RMAN-08005: partial resync complete
See Also: For catalog command syntax, see "catalog".
Include the recovery catalog in your backup and recovery strategy. If you do not back up your recover catalog and a disk crash occurs, you may lose some or all of your data. Avoid this unpleasant scenario by thinking about how to back up and recover the recovery catalog.
This section contains the following topics:
When developing a strategy for backing up the recovery catalog, follow these guidelines:
Back up the recovery catalog with the same frequency that you back up your target database. For example, if you make a weekly whole database backup of your target database, then back up your recovery catalog immediately after each target database backup. The backed up catalog will have a record of the target backup preceding it, so if you are forced to restore the catalog you will also be able to use it to restore the target database backup.
When backing up the recovery catalog, you have a choice of making O/S or RMAN backups. The advantage of making O/S backups is that you can restore them using O/S methods without relying on RMAN or a recovery catalog. For O/S backup procedures, see Chapter 13, "Performing Operating System Backups".
If you use RMAN to back up the recovery catalog database, consider how you will restore the recovery catalog in case of failure. For example, you can:
Never store a recovery catalog containing the RMAN metadata for a database in the same database as your target database. For example, do not store the catalog for database PROD1 in PROD1. A recovery catalog for PROD1 is only effective if it is separated from the data that it is designed to protect. If PROD1 suffers a total media failure, and the recovery catalog data for PROD1 is also stored in PROD1, then you have no catalog to aid in recovery.
This rule is especially important when you want to back up a recovery catalog database. Take a case in which database RCAT contains the recovery catalog metadata for target database PROD1. You decide to use a recovery catalog to back up RCAT, but are not sure where to store this catalog. If you store the catalog containing metadata for RCAT in database RCAT itself, then if you lose RCAT because of a media failure you will have difficulty restoring RCAT and will leave PROD1 unprotected.
Use the Export utility to make convenient backups of your recovery catalog data. An export of the catalog allows the most flexibility when the recovery catalog must be restored, because it can be restored to any existing Oracle8i database.
For example, if the owner of the catalog in database PROD1 is RMAN, you can issue the following at the UNIX command line to export the catalog to file cat.dmp
:
% exp rman/rman@prod1 file=cat.dmp owner=rman
Export terminated successfully without warnings.
See Also: To learn how to use the Export utility, see Oracle8i Utilities. To learn how to make O/S backups, see Chapter 13, "Performing Operating System Backups".
The method you use to recover the catalog depends on the method you use to back it up. You have these options:
If you backed up the recovery catalog using operating system commands, then restore the backup of the catalog using O/S commands and issue SQL*Plus commands to recover it. The method you use depends on whether you are recovering the entire recovery catalog database or only the tablespace in which the recovery catalog is stored. For procedures, see Chapter 14, "Performing Operating System Recovery".
If you use RMAN to recover the catalog, then see Chapter 9, "Restoring and Recovering with Recovery Manager" for the relevant procedures.
If you used Export to make a logical backup of the recovery catalog, then use Import to recover it. If a media failure damages your recovery catalog database, do the following:
For example, assume the following:
See Also: To learn how to use the Import utility, see Oracle8i Utilities.
If the recovery catalog database is lost or damaged, and recovery of the recovery catalog database through the normal Oracle recovery mechanisms is not possible, then you must re-create the catalog.
You have two options for partially re-creating the contents of the old catalog:
You can re-create information about backup sets only by using the resync catalog from controlfilecopy command, because the catalog command does not support re-cataloging of backup pieces or backup sets. RMAN does not verify that the files being re-cataloged still exist, so the resynchronization may add records for files that no longer exist. Remove such records by issuing change ... crosscheck or crosscheck backup commands.
If you use a version of the recovery catalog that is older than that required by the RMAN executable, then you must upgrade it. For example, you must upgrade the catalog if you use an 8.1 version of RMAN with an 8.0 recovery catalog.
You will receive an error on issuing upgrade catalog if the recovery catalog is already at a version greater than that required by the RMAN executable. RMAN permits the upgrade catalog command to be run if the recovery catalog is current and does not require upgrading, however, so that you can re-create packages at any time if necessary. Check the message log for error messages generated during the upgrade.
% rman target / catalog rman/rman@rcatRMAN-06008: connected to recovery catalog database RMAN-06186: PL/SQL package rcat.DBMS_RCVCAT version 08.00.04 in RCVCAT database is too old
RMAN> upgrade catalogRMAN-06435: recovery catalog owner is rman RMAN-06442: enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> upgrade catalogRMAN-06408: recovery catalog upgraded to version 08.01.05 RMAN-06452: DBMS_RCVMAN package upgraded to version 08.01.05 RMAN-06452: DBMS_RCVCAT package upgraded to version 08.01.03
See Also: For upgrade catalog command syntax, see "upgradeCatalog". For complete compatibility and migration information, see Oracle8i Migration.
If you do not want to maintain a recovery catalog, then you can drop the recovery catalog schema from the tablespace. The drop catalog command deletes all information from the recovery catalog. Hence, if you have no backups of the recovery catalog schema, then all backups of all target databases managed by this catalog become unusable.
The drop catalog command is not appropriate for "unregistering" a single database from a catalog that registers multiple target databases. If you try to delete the information for one target database by dropping the catalog, you delete the information for all target databases.
% rman catalog rman/rman@rcvcat
RMAN> drop catalogRMAN-06435: recovery catalog owner is rman RMAN-06436: enter DROP CATALOG command again to confirm catalog removal RMAN> drop catalog
See Also: For drop catalog command syntax, see "dropCatalog".
RMAN works perfectly well without a recovery catalog. In fact, the recovery catalog receives its information from the control file. If you choose not to use a recovery catalog, however, you must perform the following tasks:
See Also: For a conceptual overview of the control file, see Oracle8i Concepts. For a description of the importance of the control file for backup and recovery, see Chapter 6, "Managing Recovery Manager Metadata". For more detailed information on managing the control file, see Oracle8i Administrator's Guide.
RMAN provides several commands that allow you to check and delete records of backups as well as physically remove backups and copies. "Maintaining RMAN Metadata" provides a complete description of these maintenance procedures. Most of these commands work whether or not you use a recovery catalog.
For a list of the commands that require a catalog, see "Consequences of Using the Control File for RMAN Metadata". You do not lose much in the way of maintenance functionality when you do not use a recovery catalog, because you can:
If you use the control file as the sole repository of the RMAN metadata, maintain alternate control files through multiplexing or O/S mirroring and back up the control file frequently. If you should lose your control file and do not have a backup, you will lose all information about RMAN backups and copies contained in the file.
To learn how to multiplex and mirror the control file, see "Managing the Control File". To learn how to make O/S backups of the control file, see "Backing Up the Control File to a Physical File" and "Backing Up the Control File to a Trace File".