oracle-rman-3
Posted 阳光-源泉
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle-rman-3相关的知识,希望对你有一定的参考价值。
http://blog.csdn.net/leshami/article/details/6032525 rman概述及体系结构
http://blog.itpub.net/23513800/viewspace-664869/ rman帮助命令
恢复目录的创建
rc库上操作192.168.3.222
sqlplus / as sysdba
create tablespace rmans;
create user rmans identified by 123456 default tablespace rmans QUOTA UNLIMITED ON rmans;
select * from dba_roles where role like ‘%CATA%‘;
select * from dba_sys_privs WHERE GRANTEE LIKE ‘%CATA%‘;
grant recovery_catalog_owner to rmans;
这是在rc库上的重做操作(如果有问题,就重来一遍)
drop user rmans cascade;
drop tablespace rmans including contents;
create tablespace rmans;
create user rmans identified by 123456
default tablespace rmans
quota unlimited rmans;//这一行一定要加,否则会报第一个错(无权限的错)
grant recovery_catalog_owner to rmans;
alter user rmans quota unlimited on rmans;//如果创建用户时没有加,就这样加上去
目标库上操作192.168.3.202
rman catalog [email protected]
create catalog;
connect target / 这条语句是在同一个会话中操作或者下面的语句(重新连接)都可以
rman target / catalog rmans
register database;
有两个报错需要处理一下
报错一:
RMAN> create catalog;
error creating config_update
ORACLE error from recovery catalog database: ORA-01950: no privileges on tablespace ‘RMANS‘
ORACLE error from recovery catalog database: ORA-00942: table or view does not exist
只需要下面这条语句就可以了
alter user rmans quota unlimited on rmans;
报错二:
RMAN> create catalog;
error creating db
ORACLE error from recovery catalog database: ORA-00955: name is already used by an existing object
ORACLE error from recovery catalog database: ORA-00942: table or view does not exist
在目标库上丢弃重建就可以了
drop catalog;
drop catalog;
exit
rman catalog [email protected]
create catlog;
===================
RMAN> drop catalog;
recovery catalog owner is RMANS
enter DROP CATALOG command again to confirm catalog removal
RMAN> drop catalog;
recovery catalog dropped
RMAN> exit
Recovery Manager complete.
[[email protected] ~]$ rman catalog [email protected]
Recovery Manager: Release 11.2.0.4.0 - Production on Mon Aug 14 18:34:53 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
recovery catalog database Password:
connected to recovery catalog database
RMAN> create catalog;
recovery catalog created
RMAN> connect target /
connected to target database: KYC (DBID=111003738)
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN>
以上是关于oracle-rman-3的主要内容,如果未能解决你的问题,请参考以下文章