Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

351

积分

0

好友

8

主题
1#
发表于 2012-4-24 11:05:05 | 查看: 8357| 回复: 3
You should only run the SET DBID command in the following specialized circumstances:
  • You are not connected to a recovery catalog and want to restore the control file (see Example 2-137). The same restriction applies when you use the Data Recovery Advisor to restore a control file autobackup. CONFIGURE can locate an autobackup and restore it only if SET DBID is issued before ADVISE FAILURE.
  • You want to restore the server parameter file (see Example 2-138).
  • You are connected to the recovery catalog but not the target database and use the FOR DB_UNIQUE_NAME option on the CONFIGURE, LIST, REPORT, SHOW, or UNREGISTER commands.

这个是官方文档的说法,但是我还是不明白为什么需要set dbid。
为什么知道了db_name还不能restore controlfile?为什么连到recovery catalog就不用set dbid?
2#
发表于 2012-4-24 21:43:57
”为什么知道了db_name还不能restore controlfile?“

db_name不是一个数据库的唯一标识

rman 通过 dbid 和 controlfile的自动备份格式 来决定 哪些控制文件是针对这个 DB的。

想象一个场景 没有DBID , 同一个OS上 存有 2个  db_name 一样的 不同DB  在特定的区域对 控制文件做了自动备份(autobackup controlfile), 当丢失控制文件时  若没有dbid 这个唯一标识 如何 确定 哪一个控制文件 是对的呢?

RMAN uses the autobackup format and DBID to determine where to hunt for the control file autobackup. If one is found, RMAN restores the control file from that backup to all of the control file locations listed in the CONTROL_FILES initialization parameter.

http://docs.oracle.com/cd/B19306_01/backup.102/b14192/recov004.htm

回复 只看该作者 道具 举报

3#
发表于 2012-4-24 21:46:13
原帖由 maclean 于 2012-4-24 21:43 发表
”为什么知道了db_name还不能restore controlfile?“

db_name不是一个数据库的唯一标识

rman 通过 dbid 和 controlfile的自动备份格式 来决定 哪些控制文件是针对这个 DB的。

想象一个场景 没有DBID , 同一个OS上  ...

谢谢刘大,那为什么连到recovery catalog就不用set dbid?

回复 只看该作者 道具 举报

4#
发表于 2012-4-24 21:55:16
Restrictions and Usage Notes for the SET DBID Command

You should only run the SET DBID command in the following specialized circumstances:

    You are not connected to a recovery catalog and want to restore the control file or server parameter file.

    You are connected to a recovery catalog and want to restore the control file, but the database name is not unique in the recovery catalog.

    The server parameter file is lost and you want to restore it.


http://docs.oracle.com/cd/B19306 ... 194/rcmsynta055.htm


“那为什么连到recovery catalog就不用set dbid?”

仅仅在 recovery catalog的记录中 相关DB NAME是 Unique 唯一的情况 下 ,不需要设置 dbid 即可restore controlfile

反过来说 如果 recovery catalog中 注册(Register)了2个 db name一致的 DB ,那么也会要求你 set dbid

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-24 10:17 , Processed in 0.048610 second(s), 22 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569