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]