Oracle® Database Recovery Manager Reference 10g Release 1 (10.1) Part Number B10770-02 |
|
|
View PDF |
resync::=
To perform a full resynchronization of the recovery catalog. You can also use RESYNC
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 RESYNC
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 RESYNC
CATALOG
command updates the classes or records described in the following table.
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.
Use RESYNC
CATALOG
to perform manual full resynchronizations when:
ARCHIVELOG
mode, because the catalog is not updated automatically when a log switch occurs or when an online redo log is archived.The primary use for RESYNC
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.
RESYNC
CATALOG
, but a catalog connection is not required for RESYNC
CONTROLFILE
.This example performs a full resynchronization after archiving all unarchived redo logs:
CONNECT TARGET / CATALOG rman/rman@catdb SQL "ALTER SYSTEM ARCHIVE LOG ALL"; RESYNC CATALOG;
This example updates the RMAN repository in the current control file with metadata from a backup control file:
CONNECT TARGET / NOCATALOG RESYNC CONTROLFILE FROM CONTROLFILECOPY '/tmp/cfile.dbf';
This example adds a datafile to tablespace users
and then resynchronizes the catalog:
#!/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