发生的这个错误的由于:

在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的库,否则会产生混乱。

 
 

最新文章

  1. jQuery插件编写规范
  2. poj: 1005
  3. [bootstrap] 栅格系统和布局
  4. iOS开发之都兴忱小结
  5. 运行所有sdk目录下的示例,查看它们的功能,方便以后查寻
  6. FPGA笔记-读取.dat文件
  7. poj 1011 搜索减枝
  8. poj2027简单题
  9. mysql5.5慢日志设置和查询
  10. H5缓存-Manifest
  11. C语言——第一次作业(2)
  12. What is the best way to handle Invalid CSRF token found in the request when session times out in Spring security
  13. JGUI源码:开发中遇到的问题(11)
  14. Python编程四大神兽:迭代器、生成器、闭包和装饰器
  15. Python MD5算法使用
  16. JS,Jquery获取各种屏幕的宽度和高度(转载)
  17. Spring Cloud的Zuul的使用问题
  18. LigerUI可编辑表格左下角出现白色小方块遮罩层问题解决办法
  19. MongoDB中设置expire过期自动删除
  20. u-boot支持yaffs映像烧写的补丁

热门文章

  1. Zbar算法流程介绍
  2. PCL—关键点检测(Harris)低层次点云处理
  3. JavaPersistenceWithMyBatis3笔记-第2章Bootstrapping MyBatis-001XMl形式和Java形式
  4. SDUT 3362 数据结构实验之图论六:村村通公路
  5. Node.js 介绍及学习
  6. HUB和Switch
  7. IMP-00003: 遇到 ORACLE 错误 959 ORA-00959: 表空间 '' 不存在
  8. 浅谈《守望先锋》中的 ECS 构架
  9. 《图解HTTP》阅读笔记--第十一章针对web的攻击技术
  10. P4841 城市规划 FFT+生成函数