How To Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies [ID 470463.1]
In this Document
How to catalog backups / archivelogs / datafile copies / controlfile copies
etc. in various versions of oracle.
The RMAN CATALOG command is used to accomplish the following
+ Add backup pieces and image copies on disk to the RMAN repository.
+ Record a datafile copy as a level 0 incremental backup in the RMAN repository, which enables you to use it as part of an incremental backup strategy.
+ Record the existence of the last user-managed datafile copies made after the final shutdown
Restrictions and Usage Notes
+ You must be connected to the target database, which must be mounted or open.
+ If RMAN is connected to a recovery catalog, then the catalog database must be open.
+ For a user-managed copy to be cataloged, it must be a datafile copy, control file copy, archived log, or backup piece.
+ Accessible on disk.
+ You cannot use CATALOG to catalog a file that belongs to a different database.
1. Cataloging an Archived Redo Log:
This example assumes that you made operating system copies of archived logs or transferred them from another location, and then added them to the RMAN repository:
CATALOG ARCHIVELOG '?/oradata/archive1_30.dbf', '?/oradata/archive1_31.dbf',
2. Cataloging a File Copy as an Incremental Backup:
The following example catalogs datafile copy users01.bak as an incremental level 0 backup:
CATALOG DATAFILECOPY '?/oradata/users01.bak' LEVEL 0;
Note that you can create datafile copies either using the RMAN BACKUP AS COPY command, or by using operating system utilities in conjunction with ALTER TABLESPACE BEGIN/END BACKUP.
3. The folllowing example catalogs a user managed controlfile copy in the RMAN repository :
The command to take a controlfile copy is below :
sql> alter database backup controlfile to 'disk1/control01.ctl';
The command to catalog a controlfile copy is below :
RMAN> catalog controlfilecopy '/disk1/control01.ctl';
4. Cataloging Multiple Copies in a Directory:
The following example catalogs a directory full of archived logs that were copied into the /tmp/arch_logs directory with an operating system utility:
CATALOG START WITH '/tmp/arch_logs';
5. Cataloging Files in the Flash Recovery Area:
The following example catalogs all files in the currently enabled flash recovery area without prompting the user for each one:
CATALOG RECOVERY AREA NOPROMPT;
6. Cataloging Backup Pieces:
The following example catalogs a RMAN backup piece that was copied with an operating system utility:
CATALOG BACKUPPIECE '?/oradata/01dmsbj4_1_1.bcp';
7. The below command will catalog the backup pieces held in the location set for db_recovery_file_dest parameter:
RMAN> catalog db_recovery_file_dest;
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/17252115/viewspace-764903/，如需转载，请注明出处，否则将追究法律责任。