Oracle 11g建立虛擬私有目錄RMAN-06004 ORA-00942錯誤的處理

eric0435發表於2015-05-10

一個網友在linux下的11.2.0.4 中建立RMAN的虛擬私有目錄報錯:

[oracle@jb ~]$ rman

Recovery Manager: Release 11.2.0.4.0 - Production on Sun May 10 17:23:25 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect catalog vpc1/vpc1@cs

connected to recovery catalog database

RMAN> create virtual catalog;

found eligible base catalog owned by RMAN
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-06004: ORACLE error from recovery catalog database: ORA-00942: table or view does not exist

從上面資訊可以看到found eligible base catalog owned by RMAN,說明已經找到了合格的基本恢復目錄使用者,由於使用的基本恢復目錄使用者rman已經註冊了資料庫,於是新建一個基本恢復目錄使用者cat1,虛擬私有目錄使用者 virtcat

1.建立基本恢復目錄使用者cat1,虛擬私有目錄使用者virtcat

SQL> create user cat1 identified by cat1
  2       default tablespace sysaux
  3       quota unlimited on sysaux;

User created.

SQL> grant recovery_catalog_owner to cat1;

Grant succeeded.

SQL> create user virtcat identified by virtcat
  2       default tablespace sysaux
  3       quota unlimited on sysaux;

User created.

SQL> grant recovery_catalog_owner to virtcat;

Grant succeeded.

2.建立基本恢復目錄

[oracle@jb ~]$ rman catalog cat1/cat1@cs

Recovery Manager: Release 11.2.0.4.0 - Production on Sun May 10 17:24:50 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

RMAN> grant register database to virtcat;

Grant succeeded.

3.建立虛擬私有恢復目錄

[oracle@jb cs]$ rman catalog virtcat/virtcat@cs

Recovery Manager: Release 11.2.0.4.0 - Production on Sun May 10 17:25:40 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create virtual catalog;

found ineligible base catalog owned by RMAN
found eligible base catalog owned by CAT1
created virtual catalog against base catalog owned by CAT1

4.在虛擬私有目錄中註冊目標資料庫

[oracle@jb cs]$ rman target sys/system@db catalog virtcat/virtcat@cs

Recovery Manager: Release 11.2.0.4.0 - Production on Sun May 10 17:46:51 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DB (DBID=1640573015)
connected to recovery catalog database

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

總結:在建立與使用虛擬私有恢復目錄時,基本恢復目錄中不能註冊目標資料庫,否則會出現RMAN-06004, ORA-00942錯誤資訊。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-1633550/,如需轉載,請註明出處,否則將追究法律責任。

相關文章