发生的这个错误的由于:

在RMAN CATALOG中,register了一个name叫test的数据库,后来这个库被我搞坏了。就重建了一个test的数据库,名称没有更改,又重新register到RMAN CATALOG中。在用CATALOG备份都是没有问题。后来模拟controlfile/datafile丢失的case,就发生了

RMAN-20005: target database name is ambiguous的错误。

由于CATALOG上有两个不同DBID但是名称相同的target database,CATALOG不知道要连接哪个target,故报错。

可以通过以下方式解决:

1. 连接到catalog 上,获取到dbid的信息

$ sqlplus rman/rman@db

SQL*Plus: Release 9.2.0.1.0 - Production on Thu Mar 13 14:43:24 2008

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

SQL> select * from rc_database;

DB_KEY  DBINC_KEY       DBID NAME     RESETLOGS_CHANGE# RESETLOGS_TIME

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

1          2 1943768960 TEST                845248 15-FEB-08

287        288 1947325841 TEST                     1 12-MAR-08

新库比老库创建的晚,那DBID为 1947325841

2. 确认DBID的信息:

通过list backup反馈的信息确认是否正确:

$ rman target / catalog rman/rman@db

Recovery Manager: Release 9.2.0.1.0 - 64bit Production

Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.

connected to target database: test (not mounted)

connected to recovery catalog database

RMAN> set dbid = 1947325841

executing command: SET DBID

RMAN> list backup;

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

317     Full    65M        DISK        00:00:04     13-MAR-08

BP Key: 319   Status: AVAILABLE   Tag: TAG20080313T100953

Piece Name: /backup2/test/test_03jb5dfh_1_1.bak

List of Datafiles in backup set 317

File LV Type Ckp SCN    Ckp Time  Name

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

2       Full 70680      13-MAR-08 /backup1/data/test/oradata/undotbs01.dbf

3       Full 70680      13-MAR-08 /backup1/data/test/oradata/test01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

318     Full    127M       DISK        00:00:13     13-MAR-08

BP Key: 320   Status: AVAILABLE   Tag: TAG20080313T100953

Piece Name: /backup2/test/test_04jb5dfh_1_1.bak

List of Datafiles in backup set 318

File LV Type Ckp SCN    Ckp Time  Name

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

1       Full 70680      13-MAR-08 /backup1/data/test/oradata/system01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

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

325     Full    2M         DISK        00:00:01     13-MAR-08

BP Key: 326   Status: AVAILABLE   Tag:

Piece Name: /backup2/test/test_c_c-1947325841-20080313-00

SPFILE Included: Modification time: 28-FEB-08

我只备份了一次新库,呵呵。毫无疑问,DBID是正确的。

说明:

不要在同一个CATALOG中注册相同的DBNAME的库,否则会产生混乱。

 
 

转 RMAN-20005: target database name is ambiguous的更多相关文章

  1. 使用duplicate target database ... from active database复制数据库

    使用duplicate target database ... from active database复制数据库 source db:ora11auxiliary db:dupdb 1.修改监听文件 ...

  2. 【RMAN】RMAN-05001: auxiliary filename conflicts with the target database

    oracle 11.2.0.4 运行以下脚本,使用活动数据库复制技术创建dataguard备库报错rman-005001: run{ duplicate target database for sta ...

  3. duplicate database的时候,rman连接 auxiliary database的后状态不正确

    duplicate database的时候,rman连接 auxiliary database的后状态不正确 auxiliary database 已经被startup nomount,但是rman连 ...

  4. 采用Duplicate target database在线恢复秩序oracle datagard图书馆设备

    线上oracle datagard备库由于断电以及误删除从库的归档日志文件,所以导致,备库主库数据不一致,备库须要紧急恢复.以下是大概恢复过程 1,从主库上面备份控制文件[oracle@localho ...

  5. [Oracle][RMAN] Use RMAN to Migrate database from CentOS_5-11201-SingleDB to OracleLinux_5-11204-SingleDB

    リンク:How to Move/Restore DB to New Host and File System using RMAN (Doc ID 1338193.1)https://docs.ora ...

  6. RMAN-05541: no archived logs found in target database

    执行 duplicate target databaseto orcl from active database nofilenamecheck报错如下: RMAN> duplicate tar ...

  7. DG duplicate报错:RMAN-05001:auxiliary file name /u01/app/oracle/oradata/fratbs01.dbf conflicts with a file used by the target database

    问题:rman duplicate时报错: RMAN-05001:auxiliary file name /u01/app/oracle/oradata/fratbs01.dbf conflicts ...

  8. ORA-16047: DGID mismatch between destination setting and target database

    做DG的时候 主库两个节点无法把日志传到备库上 SQL> select dest_name,status,type,database_mode,protection_mode,destinati ...

  9. flask迁移数据库时报错:Target database is not up的解决方案

    在flask中进行数据库迁移时报错,报错信息为"Target database is not up",解决方案如下 找到alembic的最新版本号,找到文件夹migrate下的最新 ...

随机推荐

  1. Windows系统 安装 CMake

    Windows系统 安装 CMake 我们的电脑系统:Windows 10 64位 安装的CMake 版本:cmake-3.6.1-win64-x64(目前最新) 下载 在CMake官网下载:cmak ...

  2. 39、count_rpkm_fpkm_TPM

    参考:https://f1000research.com/articles/4-1521/v1 https://www.biostars.org/p/171766/ http://www.rna-se ...

  3. A - Dictionary

    传送门 题目大意 给你n个字符串,问是否可以通过改变26个字母的排列顺序是这n个字符串的字典序是非降排列的. 分析 我们考虑设相邻两个字符串的第一个不相同字符的位置为j,以为要求字典序不降,所以有第i ...

  4. Luogu 3172 [CQOI2015]选数

    考虑枚举$k$的倍数$dk$,容易知道$\left \lceil \frac{L}{K} \right \rceil\leq d\leq \left \lfloor \frac{H}{k} \righ ...

  5. Netty的Channel

    Channel是一个网络端口连接,或者是可以进行读,写,链接,绑定端口的组件的连接.  Channel就是一个链接,它提供了如下的功能. 1:获取当前链接的状态 2:配置当前链接参数 3:进行read ...

  6. WordCount编码测试

    Github项目地址:https://github.com/LantyrLYL/WordCount PSP表格: PSP2.1 PSP阶段 预估耗时 (分钟) 实际耗时 (分钟) Planning 计 ...

  7. 解决java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext问题

    使用ClassPathXmlApplicationContext加载项目时, ClassPathXmlApplicationContext context = new ClassPathXmlAppl ...

  8. rf常用关键字

    上传文件choose file 用法:choose file     元素定位          文件路径\\文件名 此处注意:复制的路径是/,需全部替换成\\ 清除Clear Element Tex ...

  9. c语言判断是否是utf8字符串,计算字符个数

    #include <stdio.h> #include <string.h> #include <stdlib.h> /********************** ...

  10. C# console application executing macro function

    C#控制台应用程序,执行或运行Office的宏函数,程序如下: 应用例子: