全部博文(389)
分类: Oracle
2015-04-17 16:19:42
ORACLE 12C的CATALOG创建BUG
当rman的客户端的数据库是12c的时候,使用以前的版本db创建catalog会报错,
过程如下:
在以前的版本创建用户
SQL> create user test identified by test;
User created.
SQL> grant recovery_catalog_owner to test;
Grant succeeded.
在12C的rman中创建catalog
RMAN> create catalog;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-07539: insufficient privileges to create or upgrade the catalog schema
即使用test用户给dba权限也不行
RMAN> create catalog;
recovery catalog created
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06004: ORACLE error from recovery catalog database: ORA-01917: user or role 'RECOVERY_CATALOG_USER' does not exist
报角色或用户不存在
果断上mos一查,发现原来是 bug,可以参考Oracle Support Document 1915561.1 (Upgrade Recovery Catalog fails with RMAN-07539: insufficient privileges).
拷贝12C的ORACLE_HOME/rdbms/admin下的三个文件到catalog database下执行
sqlsessstart.sql
sqlsessend.sql
sqlsessstart.sql
SQL> @/home/oracle/dbmsrmansys.sql;
alter session set "_ORACLE_SCRIPT" = true
*
ERROR at line 1:
ORA-02248: invalid option for ALTER SESSION
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Grant succeeded.
.................
alter session set "_ORACLE_SCRIPT" = false
*
ERROR at line 1:
执行报错,可以不用理会
RMAN> create catalog;
recovery catalog created
再次可以成功创建了.