数据库已经启动
RMAN> restore controlfile from autobackup;
启动 restore 于 11-8月 -13
使用目标数据库控制文件替代恢复目录
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=133 设备类型=DISK
恢复区目标: F:\rmanbackup
用于搜索的数据库名 (或数据库的唯一名称): ORCL
通道 ORA_DISK_1: 在恢复区中没有找到 AUTOBACKUP
由于未设置 DBID 而未尝试使用格式 "%F" 搜索 AUTOBACKUP
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: restore 命令 (在 08/11/2013 15:30:20 上) 失败
RMAN-06172: 没有找到 AUTOBACKUP, 或者指定的句柄不是有效副本或片段
RMAN> restore controlfile from 'f:\rmanbackup\controlfile\C-1318810635-20130811-00';
启动 restore 于 11-8月 -13
使用通道 ORA_DISK_1
通道 ORA_DISK_1: 正在还原控制文件
通道 ORA_DISK_1: 还原完成, 用时: 00:00:03
输出文件名=E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL
输出文件名=E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL
完成 restore 于 11-8月 -13
经查看,发现控制文件已经被转储到目标位置;
RMAN> alter database mount;
数据库已装载
释放的通道: ORA_DISK_1
RMAN> recover database;
启动 recover 于 11-8月 -13
启动 implicit crosscheck backup 于 11-8月 -13
分配的通道: ORA_DISK_1
通道 ORA_DISK_1: SID=133 设备类型=DISK
已交叉检验的 2 对象
完成 implicit crosscheck backup 于 11-8月 -13
启动 implicit crosscheck copy 于 11-8月 -13
使用通道 ORA_DISK_1
完成 implicit crosscheck copy 于 11-8月 -13
搜索恢复区中的所有文件
正在编制文件目录...
没有为文件编制目录
使用通道 ORA_DISK_1
正在开始介质的恢复
线程 1 序列 190 的归档日志已作为文件 E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG 存在于磁盘上
归档日志文件名=E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03.LOG 线程=1 序列=190
介质恢复完成, 用时: 00:00:03
完成 recover 于 11-8月 -13
RMAN> alter database open resetlogs;
数据库已打开
其中OCP 有一道考察这样的题目:
Q606. You realize that the control file is damaged in your production database. After restoring the control file from autobackup, what is the next step that you must do to proceed with the database recovery
A. Mount the database
B. Open the database in NORMAL mode
C. Open the database in RESTRICTED mode
D. Open the database with the RESETLOGS option
Answer: A
Recovering Using RMAN Backups Restoring the Control File from the Autobackup
Restoring the control file from an autobackup is similar to the steps you use to restore an SPFILE from an autobackup.
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;
RMAN> alter database mount;
RMAN> recover database;
RMAN> alter database open resetlogs;
Note that since there is no control file, you have to open the database with NOMOUNT and then restore the control file. After you mount the database, you must recover the database, because the backup control file contains information about an older version of the database. For the same reason, you must open the database with RESETLOGS. RMAN restores the control file to all locations specified by theinitialization parameter CONTROL_FILES. If one or more of those locations are still not available, you will have to edit the CONTROL_FILES parameter to specify alternative locations or temporarily restore the control file to adifferent location;