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

2014-11-24 17:05:54 · 作者: · 浏览: 4
abase open
[oracle@test ~]$ tail 30 /opt/app/oracle/admin/wolf/bdump/alert_wolf.log
tail: cannot open `30' for reading: No such file or directory
==> /opt/app/oracle/admin/wolf/bdump/alert_wolf.log <==
SMON: enabling tx recovery
Mon Apr 22 10:25:29 2013
Re-creating tempfile /opt/app/oracle/oradata/wolf/temp01.dbf
Database Characterset is WE8ISO8859P1
replication_dependency_tracking turned off (no async multimaster replication found)
Mon Apr 22 10:25:40 2013
Starting background process QMNC
QMNC started with pid=23, OS id=16115
Mon Apr 22 10:25:57 2013
Completed: alter database open
[oracle@test ~]$
===================================================================================================
恢复单个数据文件
模拟system文件丢失
[oracle@test wolf]$ ls
control01.ctl redo02.log redo11.log system01.dbf wolfblock01.dbf
control02.ctl redo03.log redo12.log temp01.dbf
control03.ctl redo04.log redo13.log undotbs01.dbf
redo010.log redo05.log rman_wolf.dbf users01.dbf
redo01.log redo06.log sysaux01.dbf wolf01
[oracle@test wolf]$ mv system01.dbf system01.dbf.bak
RMAN> shutdown immediate
database closed
database dismounted
Oracle instance shut down
RMAN> startup
connected to target database (not started)
Oracle instance started
database mounted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 04/22/2013 10:35:35
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/opt/app/oracle/oradata/wolf/system01.dbf'
RMAN> restore datafile 1;
Starting restore at 22-4月 -13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /opt/app/oracle/oradata/wolf/system01.dbf
channel ORA_DISK_1: reading from backup piece /opt/app/oracle/flash_recovery_area/WOLF/backupset/2013_04_22/o1_mf_nnndf_TAG20130422T091128_8qbfr0t1_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/app/oracle/flash_recovery_area/WOLF/backupset/2013_04_22/o1_mf_nnndf_TAG20130422T091128_8qbfr0t1_.bkp tag=TAG20130422T091128
channel ORA_DISK_1: restore complete, elapsed time: 00:03:57
Finished restore at 22-4月 -13
RMAN> recover datafile 1;
Starting recover at 22-4月 -13
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:03
Finished recover at 22-4月 -13
RMAN> alter database open;
database opened