DG中用物理备库的备份来恢复主库(一)
一、验证备库单个数据文件的备份能否用于主库恢复
1、先在备库上对6号数据文件进行备份
[oracle@DG2 ~]$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Mon Oct 21 01:46:37 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORCL (DBID=1357156209, not open)
RMAN> report schema;
using target database control file instead of recovery catalog
RMAN-06139: WARNING: control file is not current for REPORT SCHEMA
Report of database schema
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 440 SYSTEM *** /oracle/oradata/orcl/system01.dbf
2 35 UNDOTBS1 *** /oracle/oradata/orcl/undotbs01.dbf
3 250 SYSAUX *** /oracle/oradata/orcl/sysaux01.dbf
4 5 USERS *** /oracle/oradata/orcl/users01.dbf
5 100 EXAMPLE *** /oracle/oradata/orcl/example01.dbf
6 10 TEST *** /oracle/oradata/orcl/test01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 0 TEMP 32767 /oracle/oradata/orcl/temp01.dbf
RMAN> backup datafile 6 format='/oracle/backup/test_%U.bak';
Starting backup at 21-OCT-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=147 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00006 name=/oracle/oradata/orcl/test01.dbf
channel ORA_DISK_1: starting piece 1 at 21-OCT-13
channel ORA_DISK_1: finished piece 1 at 21-OCT-13
piece handle=/oracle/backup/test_02omu1ug_1_1.bak tag=TAG20131021T014800 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 21-OCT-13
RMAN>exit
