为rman建立catalog数据库

来源:互联网 发布:php 访问者模式 编辑:程序博客网 时间:2024/06/08 16:42

1、在目录数据库中创建恢复目录所用表空间 

SQL> create tablespace rmantbs datafile
 '/opt/app/oracle/oradata/rman/rmantbs.dbf' size 200M;
表空间已创建
2、在目录数据库中创建RMAN用户并授权 
SQL> create user rman identified by rman default tablespace rmantbs temporary tablespace temp quota unlimited on rmantbs;
用户已创建 
SQL> grant recovery_catalog_owner to rman;
授权成功
3、在目录数据库中创建恢复目录 
% rman catalog rman/rman 
恢复管理器:版本9.0.1.1.0 – 64bit Production 
连接到恢复目录数据库
未安装恢复目录 
RMAN>create catalog tablespace rmantbs;
恢复目录已创建 
4、注册目标数据库到恢复目录 
注意:这里的目标数据库使用的服务名称是bjdb,为要使用RMAN进行备份的数据库,而目录数据库使用的服务名称是rman。
% rman target sys/change_on_install@bjdb 
恢复管理器:版本9.0.1.1.0 – 64bit Production 
连接到目标数据库:BJDB (DBID=620270819) 
RMAN>connect catalog rman/rman@rman
连接到恢复目录数据库 
RMAN>register database;
注册在恢复目录中的数据库
正在启动全部恢复目录的 resync
完成全部 resync 
到此为止,准备工作都做好了,下面就可以使用RMAN来进行备份和恢复了。
0 0
原创粉丝点击