RMAN Recovery Catalog(恢复目录)

RMAN Recovery Catalog,各种翻译的都有,有叫“恢复目录”,也有叫“知识库”等等。“恢复目录”叫的多一些,姑且先用这个翻译吧。

你可能从其他人或书上听过RMAN恢复目录,旁人的表达或书中模糊不清的描述,导致很多朋友一直对其实际意义和作用感到疑惑。你可以将其视作存储RMAN备份恢复相关信息的数据库(在物理形式上可以对应成Oracle中的一个SCHEMA)。 关于Oracle设置恢复目录目的,Oracle官方文档给出了说明

Purpose of the Recovery Catalog

A recovery catalog is a database schema used by RMAN to store metadata about one or more Oracle databases. Typically, you store the catalog in a dedicated database. A recovery catalog provides the following benefits:

  • A recovery catalog creates redundancy(冗余) for the RMAN repository stored in the control file of each target database. The recovery catalog serves as a secondary metadata repository. If the target control file and all backups are lost, then the RMAN metadata still exists in the recovery catalog.

  • A recovery catalog centralizes metadata for all your target databases. Storing the metadata in a single place makes reporting and administration tasks easier to perform.

  • A recovery catalog can store metadata history much longer than the control file. This capability is useful if you have to do a recovery that goes further back in time than the history in the control file. The added complexity of managing a recovery catalog database can be offset by the convenience of having the extended backup history available.


当没有恢复目录时,RMAN相关的备份信息(比如归档文件路径、备份集路径等)均存储在目标数据库的控制文件中,不过考虑到控制文件并不能无限增长,而且控制文件也不仅仅是用来存储与备份相关的信息,因此RMAN也有一个专门的备份信息存储地,这就是恢复目录了。当待备份的数据库注册到恢复目录之后,RMAN相关的信息除了保存在控制文件中外(控制文件实际上只保存一部分),更加详细的信息就都被存储在恢复目录中。

Recovery Catalog都存储了什么信息

The catalog includes the following types of metadata:

  • Datafile and archived redo log backup sets and backup pieces

  • Datafile copies

  • Archived redo logs and their copies

  • Database structure (tablespaces and datafiles)

  • Stored scripts, which are named user-created sequences of RMAN commands

  • Persistent RMAN configuration settings


nocatalog 
nocatalog方式就是用control file作为catalog,每一次备份都要往控制文件里面写好多备份信息,控制文件里面会有越来越多的备份信息,即RMAN的备份信息写在本地控制文件里面。因此,当使用Rman nocatalog方式备份数据库时,一定要记得备份controlfile。 

当使用rman nocatalog恢复时,数据库必须是处于“mount”状态的。而Oracle startup mount的前提条件是control必须存在。因此,你必须在恢复datafile之前先恢复controlfile。使用rman catalog方式时,可以startup nomount然后restore controlfile;但使用rman nocatalog时,必须先用文件方式恢复controlfile。

nocatalog or catalog ?
如果DBA要管理的Oracle数据库较多,那么对于这些数据库的备份,建议使用恢复目录统一管理,这样既方便备份和恢复操作,而且安全性也相对比较高(执行完备份操作后,单独备份恢复目录数据库即可,无须担心被备份的数据库控制文件丢失可能造成的影响)。不过如果DBA仅管理一个或者数个Oracle数据库,那么我想NOCATALOG模式操作起来会更加方便。Oracle官方推荐是什么?- 使用恢复目录

Use an RMAN Recovery Catalog

RMAN automatically manages the backup metadata in the control file of the database that is being backed up. To protect and keep backup metadata for long periods of time, the RMAN repository, usually referred to as a recovery catalog, is created in a separate database. There are many advantages of using a recovery catalog, including the ability to store backup information long-term, the ability to store metadata for multiple databases, and the ability to restore an available backup on to another system. In addition, if you are using only the target database control file to house the repository, the control file, with its limited maximum size, may not be large enough to hold all desired backup metadata. If the control file is too small to hold additional backup metadata, then existing backup information is overwritten, making it difficult to restore and recover using those backups.


参考&推荐阅读
《涂抹Oracle》
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值