|Oracle® Database Backup and Recovery Reference
10g Release 2 (10.2)
|PDF · Mobi · ePub|
To perform a full resynchronization of the recovery catalog. You can also use
CONTROLFILE to resynchronize the current control file with the RMAN repository in a control file copy.
Resynchronizations can be full or partial. When full, RMAN updates all changed records for the physical schema: datafiles, tablespaces, redo threads, and online redo logs. If the database is open, RMAN also obtains data about rollback segments. When partial, RMAN reads the current control file to update data, but does not resynchronize metadata about the physical schema or rollback segments.
When you run
CATALOG, RMAN creates a snapshot control file in order to obtain a read-consistent view of the control file, then updates the recovery catalog with any new information from the snapshot. The
CATALOG command updates the classes or records described in the following table.
|Log history||Records that are created whenever a log switch occurs. Note that log history records describe an online log switch, not a log archival.|
|Archived redo logs||Records associated with archived logs that were created by archiving an online redo log, copying an existing archived redo log, or restoring backups of archived redo logs.|
|Backups||Records associated with backup sets, backup pieces, proxy copies, and image copies.|
|Physical schema||Records associated with datafiles and tablespaces. If the target database is open, then rollback segment information is also updated.|
RMAN automatically executes a full or partial resynchronization of the recovery catalog as needed when you execute RMAN commands, so long as the control file is mounted and the recovery catalog database is available at command execution. RMAN reads the current control file and resynchronizes metadata about the physical schema if it determines that this information has changed. If RMAN does detect a change, then it performs a full resynchronization.
CATALOG to perform manual full resynchronizations when:
The recovery catalog is unavailable when you issue any of the commands that automatically perform a resynchronization.
You are running in
ARCHIVELOG mode, because the catalog is not updated automatically when a log switch occurs or when an online redo log is archived.
You have made changes to the physical structure of the target database such as adding or dropping a tablespace. As with archive operations, the recovery catalog is not updated automatically when the physical schema changes.
The primary use for
CONTROLFILE occurs when you re-create the control file (for example, to change the database name), which causes you to lose RMAN records. You can then resynchronize the newly created control file with an old copy.
You must be connected to a recovery catalog when running
CATALOG, but a catalog connection is not required for
RMAN updates physical schema information in the recovery catalog only when the target database has the current control file mounted. If the target database has mounted a backup control file, a freshly created control file, or a control file that is less current than a control file that was used previously, then RMAN does not update physical schema information in the recovery catalog.
||Updates the recovery recovery catalog with RMAN metadata in the current control file (default) or a control file copy.|
||Updates the current control file (and recovery catalog, if RMAN is connected to one) with RMAN metadata from a control file copy.|
||Specifies the name of the control file copy to use for resynchronization. Physical schema information is not updated when you use this option.
Note: The control file copy can either be in the current database incarnation, or created in a prior incarnation (that is, prior to the most recent
CONNECT TARGET / CATALOG rman/rman@catdb SQL "ALTER SYSTEM ARCHIVE LOG ALL"; RESYNC CATALOG;
CONNECT TARGET / NOCATALOG RESYNC CONTROLFILE FROM CONTROLFILECOPY '/tmp/cfile.dbf';
#!/usr/bin/tcsh # connect in nocatalog mode and add datafile rman TARGET / NOCATALOG <<EOF SQL "ALTER TABLESPACE users ADD DATAFILE ''?/oradata/trgt/users03.dbf'' SIZE 1M AUTOEXTEND ON NEXT 10K MAXSIZE 10M"; EXIT EOF # connect in catalog mode and resynchronize rman TARGET / CATAOG rman/rman@catdb <<EOF RESYNC CATALOG; EOF