关于CATALOG命令

文档地址:http://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta011.htm#RCMRF109

 

CATALOG

Syntax

catalog::=

Description of catalog.gif follows
Description of the illustrationcatalog.gif

Purpose

Use the CATALOG command to do the following:

  • Add backup pieces and image copies on disk to the RMANrepository.--添加在磁盘备份和映像副本到RMAN存储仓库中。

  • Record a datafile copy as a level 0 incremental backup in theRMAN repository, which enables you to use it as part of anincremental backup strategy.

  • Record the existence of the last user-managed datafile copiesmade after the final shutdown in Oracle7, before migrating thedatabase to Oracle8.

    See Also:

    OracleDatabase Backup and Recovery Basics to learn how tomanage target database records stored in the catalog

Restrictions and UsageNotes

  • You must be connected to the target database, which must bemounted or open.

  • If RMAN is connected to a recovery catalog, then the catalogdatabase must be open.

  • For a user-managed copy to be cataloged, it must be:

    • A datafile copy, control file copy, archived log, or backuppiece.

    • Accessible on disk.

    RMAN treats all user-managed backups as image copies. Note thatduring cataloging, RMAN does not check whether the file wascorrectly copied by the operating system utility: it just checksthe header.

  • You cannot catalog any datafile copies that were created inOracle7 unless they were made after the final consistent shutdownin Oracle7 and before running the migration utility, or were madeof a tablespace that was offline normal or read-only at the time ofthe migration. In other words, it must be possible to use theOracle7 datafile copies without applying any archived logs.

  • You cannot use CATALOG to catalog a file thatbelongs to a different database.

  • You cannot use CATALOG to catalog a backup piecethat exists on an sbt device.

 

文档地址:http://docs.oracle.com/cd/B19306_01/backup.102/b14192/maint007.htm#i1007717

8.7.1 About Cataloging Archived Logs andUser-Managed Copies

The target database control file keeps records of all archivedlogs generated by the target database as well as all RMAN backups.The purpose of the CATALOG command is to addmetadata to the repository when it does not have a record of filesthat you want RMAN to knowabout.--CATALOG命令的目的是添加元数据到存储仓库,当存储仓库中还没有RMAN想知道的文件的一条记录。

Run the RMAN CATALOG command when:

  • You use an operating system utility to make copies of datafiles,arch ived logs, or backup pieces. In the case, the repository hasno record of them.

  • You perform recovery with a backup control file and you changethe archiving destination or format during recovery. In thissituation, the repository will not have information about archivedlogs needed for recovery. Hence, you must catalog these logs.

  • You want to catalog datafile copy as a level 0 backup, thusenabling you to perform an incremental backup later by using thedatafile copy as the base of an incremental backup strategy

  • You want to catalog user-managed copies of Oracle7 databasefiles created before you migrated to a higher release, or ofOracle8 and higher database files created before you started to useRMAN. These datafile copies enable you to recover the database ifit crashes after migration but before you have a chance to take abackup of the migrated database.

Whenever you make a user-managed copy, for example, by using theUNIX cp command to copy a datafile, make sure tocatalog it. When making user-managed copies, you can use theALTER TABLESPACE ...BEGIN/END BACKUP statementto make datafile copies off an online tablespace. Although RMANdoes not create such datafile copies, you can use theCATALOG command to add them to the recovery catalog sothat RMAN is aware of them.

For a user-managed copy to be cataloged, it must be:

  • Accessible on disk

  • A complete image copy of a single file

  • Either a datafile copy, control file copy, archived redo logcopy, or backup piece copy

For example, if you store datafiles on mirrored disk drives,then you can create a user-managed copy by breaking the mirror.In this scenario, use the CATALOG command tonotify RMAN of the existence of the user-managed copy afterbreaking the mirror. Before reforming the mirror, runa CHANGE ...UNCATALOG command to notify RMAN that the file copy nolonger exists.

 

 

可以将用户管理的备份文件(数据文件,
控制文件、归档日志文件)记录到catalog,具体的语法是:
catalog datafilecopy(/controlfilecopy/archivelog) '' ;
另:可以由操作系统改备份文件名字,假如为a.bkp
rman>change backuppiece 'e:\....bkp' uncatalog但没有成功
于是直接删除备份集
rman>delete backupset 1;(删除控制文件对应内容和实际物理的文件)
rman>crosscheck backupset 1;
rman>list backupset 1;
变为无效的
rman>delete backupset 1;
再把a.bkp 加入到备份集来

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值