来自农村的老实娃
分类: Oracle
2008-07-30 10:39:03
如何创建一个Recovery Catalog
要创建Recovery Catalog请按以下步骤执行:
1、连接到 catalog数据库并为它创建表空间:
SQL > create tablespace rman_ts datafile ‘
size 20M default storage
(initial 100K next 100K pctincrease 0);
2.为recovery catalog创建用户:
SQL > create user rman_db01 identified by rman_db01
default tablespace rman_ts
quota unlimited on rman_ts;
3.为该用户授权
SQL > grant recovery_catalog_owner to rman_db1;
SQL > grant connect, resource to rman_db1;
4、执行以下命令:.
% rman catalog log = catalog.log
create catalog tablespace rman_ts;
exit;
Catalog.log 可能会出现以下错误:
RMAN-06008: connected to recovery catalog database
RMAN-06428: recovery catalog is not installed
RMAN> create catalog tablespace rman_ts;
RMAN-06431: recovery catalog created
RMAN>
RMAN> exit;
Recovery Manager complete
5.用sysdba权限登录目标数据库.
% rman target
RMAN-06005: connected to target database: DB01 (DBID=472633597)
RMAN> connect catalog
RMAN-06008: connected to recovery catalog database
RMAN>
6、在catalog数据库里注册目标数据库
RMAN> register database;
RMAN-03022: compiling command: register
RMAN-03023: executing command: register
RMAN-08006: database registered in recovery catalog
RMAN-03023: executing command: full resync
RMAN-08002: starting full resync of recovery catalog
RMAN-08004: full resync complete
RMAN>