ITPub博客

首页 > 数据库 > Oracle > RMAN-20005: target database name is ambiguous

RMAN-20005: target database name is ambiguous

原创 Oracle 作者:地铁上小虫 时间:2015-05-13 09:54:32 0 删除 编辑

 删除prod2目录下的所有文件,不完全恢复实验?
PROD3库创建catalog库,PROD2注册到该catalog 库;
当删除了,PROD2目录下的文件,进行不完全恢复,转储控制文件,提示错误。
之前,创建过几次PROD2库。
SQL>
export ORACLE_SID=PROD2
SQL>rman target sys/oracle@prod2 catalog RC_ADMIN/RC_ADMIN@prod3


RMAN>  restore controlfile;
Starting restore at 11-MAY-15
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/11/2015 16:54:55
RMAN-12010: automatic channel allocation initialization failed
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20005: target database name is ambiguous

在PROD3catalog库查询PROD2的DBID
      
node103.cuug.com-PROD3>sqlplus RC_ADMIN/RC_ADMIN@prod3

SQL>  select * from rc_database;

 

    DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS

---------- ---------- ---------- -------- ----------------- ---------

      1041       1042 1531266428 PROD2               945184 11-MAY-15

      1068       1069 2100770937 PROD1               945184 11-MAY-15

      1361       1362 1531272704 PROD2               945184 11-MAY-15

      1501       1502 1531275657 PROD2               945184 11-MAY-15

      1621       1622 1531278890 PROD2               945184 11-MAY-15

7 rows selected.

DBID: 1531278890较新

在PROD2库,进入rman连接prod2和prod3 catalog库
      RMAN>set DBID=1531278890

RMAN>restore controlfile;
       成功转储控制文件







来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29653765/viewspace-1651853/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-05-12

  • 博文量
    49
  • 访问量
    165806