oracle 10g rman备份与恢复之五(一)

2014-11-24 17:05:54 · 作者: · 浏览: 7
oracle 10g rman备份与恢复之五
oracle 10g rman备份与恢复之四
http://www.2cto.com/database/201304/205040.html
恢复控制文件,日志文件,整库恢复,单个数据文件恢复
nocatalog恢复
控制文件丢失恢复过程
startup nomount
restore controlfile from autobackup
alter database mount
recover database
alter database open resetlogs
模拟控制文件丢失
RMAN> shutdown immediate
database closed
database dismounted
Oracle instance shut down
[root@redhat wolf]# ls
control01.ctl redo01.log sysaux01.dbf undotbs01.dbf
control02.ctl redo02.log system01.dbf users01.dbf
control03.ctl redo03.log temp01.dbf
[root@redhat wolf]# mv control01.ctl control01.ctl.bak
[root@redhat wolf]# ls
control01.ctl.bak redo01.log sysaux01.dbf undotbs01.dbf
control02.ctl redo02.log system01.dbf users01.dbf
control03.ctl redo03.log temp01.dbf
连接rman管理器
[oracle@redhat ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on 星期日 4月 21 10:27:09 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
启动 数据库到nomount状态
RMAN> startup nomount;
Oracle instance started
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 92276304 bytes
Database Buffers 188743680 bytes
Redo Buffers 2973696 bytes
RMAN> restore controlfile from autobackup;
Starting restore at 21-4月 -13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
recovery area destination: /oracle/ora10g/flash_recovery_area
database name (or database unique name) used for search: WOLF
channel ORA_DISK_1: no autobackups found in the recovery area
autobackup search outside recovery area not attempted because DBID was not set
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 04/21/2013 10:28:26
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
RMAN> restore controlfile from '/oracle/ora10g/flash_recovery_area/WOLF/backupset/2013_04_21
2>
3>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01006: error signalled during parse
RMAN-02002: unexpected end of input file reached
还原控制文件(这里最好用全路径)
RMAN> restore controlfile from '/oracle/ora10g/flash_recovery_area/WOLF/backupset/2013_04_21/o1_mf_ncsnf_TAG20130421T095042_8q7vtb8b_.bkp';
Starting restore at 21-4月 -13
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:05
output filename=/oracle/ora10g/oradata/wolf/control01.ctl
output filename=/oracle/ora10g/oradata/wolf/control02.ctl
output filename=/oracle/ora10g/oradata/wolf/control03.ctl
Finished restore at 21-4月 -13