How To Catalog Backups / Archivelogs / Datafile Copies / Controlfile Copies in Oracle Database

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.

Note: RMAN treats all user-managed backups as image copies. Note that during cataloging, RMAN does not check whether the file was correctly copied by the operating system utility; it just checks the header.

Examples

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: 

RMAN> CATALOG ARCHIVELOG '?/oradata/archive1_30.dbf', '?/oradata/archive1_31.dbf', '?/oradata/archive1_32.dbf';

2. Cataloging a File Copy as an Incremental Backup:

The following example catalogs datafile copy users01.bak as an incremental level 0 backup:

RMAN> 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. Catlog a user managed controlfile copy in the RMAN repository

The folllowing example catalogs a user managed controlfile copy in the RMAN repository: 

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: 

RMAN> 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: 

RMAN> CATALOG RECOVERY AREA NOPROMPT;

6. Cataloging Backup Pieces:

The following example catalogs a RMAN backup piece that was copied with an operating system utility:

RMAN> CATALOG BACKUPPIECE '?/oradata/01dmsbj4_1_1.bcp'; 

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;

 

Reference:

http://www.dba-oracle.com/t_rman_103_catalog_file_copy.htm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值