RMAN-20005: target database name is ambiguous

本文详细介绍了如何解决在使用Oracle RMAN进行PROD2库恢复时遇到的DBID歧义错误问题。通过在PROD3 catalog库中查询正确的DBID,然后在PROD2库中使用RMAN连接catalog库并成功转储控制文件,最终实现了不完全恢复。

 删除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库查询PROD2DBID
      
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博客 ” ,链接:http://blog.itpub.net/29653765/viewspace-1651853/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29653765/viewspace-1651853/

b2b-dg:/home/oracle#rman target sys/oracle@ecps auxiliary sys/oracle@ecpsdg Recovery Manager: Release 11.2.0.4.0 - Production on Fri Oct 24 17:26:34 2025 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: ECPS (DBID=3593407971) connected to auxiliary database: ECPS (not mounted) RMAN> duplicate target database for standby from active database nofilenamecheck; Starting Duplicate Db at 24-OCT-25 using target database control file instead of recovery catalog configuration for DISK channel 2 is ignored allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: SID=350 device type=DISK contents of Memory Script: { backup as copy reuse targetfile '/home/app2/oracle/11.2.0.4/dbs/orapwecps1' auxiliary format '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwecpsdg' ; } executing Memory Script Starting backup at 24-OCT-25 released channel: ORA_AUX_DISK_1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of Duplicate Db command at 10/24/2025 17:26:45 RMAN-05501: aborting duplication of target database RMAN-03015: error occurred in stored script Memory Script RMAN-12001: could not open channel ORA_DISK_1 RMAN-10008: could not create channel context RMAN-10003: unable to connect to target database ORA-12154: TNS:could not resolve the connect identifier specified
最新发布
10-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值