RMAN进行备份恢复(十)

2014-11-24 15:08:47 · 作者: · 浏览: 9
.0/oradata/orcl/sysaux01.dbf
4 Full 13229464105956 12-JUN-13 /home/oracle/oracle/product/10.2.0/oradata/orcl/users01.dbf
5 Full 13229464105956 12-JUN-13 /home/oracle/oracle/product/10.2.0/db_1/dbs/TBS_ORCL_DATA01.DBF
6 Full 13229464105956 12-JUN-13 /home/oracle/oracle/product/10.2.0/db_1/dbs/TBS_ORCL_IDX01.DBF
7 Full 13229464105956 12-JUN-13 /home/oracle/oracle/product/10.2.0/oradata/orcl/tbs_data.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3 Full 6.89M DISK 00:00:03 12-JUN-13
BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20130612T125054
Piece Name: /home/oracle/oracle/product/10.2.0/flash_recovery_area/ORCL/backupset/2013_06_12/o1_mf_ncsnf_TAG20130612T125054_8vhzxlf2_.bkp
Control File Included: Ckp SCN: 13229464106126 Ckp time: 12-JUN-13
SPFILE Included: Modification time: 12-JUN-13
--备份完当然是需要进行恢复了:
--1.我们先移除一个数据文件:
[oracle@localhost orcl]$ mv tbs_data.dbf tbs_data.dbf_bak
--此时只能将 数据库打开到mount状态,无法读取数据文件:
[lubinsu@localhost oracle]$ rman target sys/lubinsu@orcl
Recovery Manager: Release 10.2.0.1.0 - Production on Wed Jun 12 13:59:33 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup mount
Oracle instance started
database mounted
Total System Global Area 285212672 bytes
Fixed Size 1218968 bytes
Variable Size 92276328 bytes
Database Buffers 184549376 bytes
Redo Buffers 7168000 bytes
RMAN> alter database open
2> ;
using target database control file instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 06/12/2013 14:00:01
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/home/oracle/oracle/product/10.2.0/oradata/orcl/tbs_data.dbf'
--查看现有的备份:
RMAN> list backup;
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 2.30G DISK 00:06:17 12-JUN-13
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20130612T125054
Piece Name: /home/oracle/oracle/product/10.2.0/flash_recovery_area/ORCL/backupset/2013_06_12/o1_mf_nnndf_TAG20130612T125054_8vhzkgdt_.bkp
List of Datafiles in backup set 2
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 13229464105956 12-JUN-13 /home/oracle/oracle/product/10.2.0/oradata/orcl/system01.dbf
2 Full 13229464105956 12-JUN-13 /home/oracle/oracle/product/10.2.0/oradata/orcl/undotbs01.dbf
3 Full 13229464105956 12-JUN-13 /home/oracle/oracle/product/10.2.0/oradata/orcl/sysaux01.dbf
4 Full 13229464105956 12-JUN-13 /home/oracle/oracle/product/10.2.0/orada