【RMAN】RMAN创建恢复目录

  恢复目录(catalog)概念

  恢复目录是由RMAN使用、维护用来放置备份信息的仓库,RMAN利用恢复目录记载的信息去判断如何执行需要的备份恢复操作。

  恢复目录可以存在于Oracle数据库的计划中

  虽然恢复目录可以用来备份多个数据库,建议为恢复目录数据库创建一个单独的数据库。

  恢复目录数据库不能使用恢复目录备份自身。

 

  恢复目录建立

1、目录数据库中创建catalog所用的表空间

SQL> create tablespace rman_catalog datafile '/u01/app/oracle/oradata/T1/rman_catalog.dbf' size 50m;

Tablespace created.

 2、创建RMAN用户并授权

SQL> create user c##rman identified by rman default tablespace rman_catalog temporary tablespace temp quota unlimited on rman_catalog;

User created.

SQL> grant recovery_catalog_owner to c##rman;

Grant succeeded.

SQL> grant connect,resource to c##rman;

Grant succeeded.

3、在数据库目中创建恢复目录

[oracle@T1 ~]$ rman catalog c##rman/rman

Recovery Manager: Release 19.0.0.0.0 - Production on Tue Jul 27 10:17:20 2021
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog tablespace rman_catalog;

recovery catalog created

 

Note:虽然使用RMAN不一定必需恢复目录,但是推荐使用。因为恢复目录记载的信息大部分可以通过控制文件来记载,RMAN在恢复数据库时使用这些信息。不使用恢复目录将会对备份恢复操作有限制。catalog还可以存储脚本,及在较长时间的备份恢复操作。

 

posted @ 2021-07-27 10:24  蟹Bro  阅读(118)  评论(0编辑  收藏  举报