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.


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方式就是用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.

©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页