整体流程:对A机的数据库来一个热备,并且是一个全备,然后通过scp命令把备份传到B机,然后把A库停掉(注意关库不会触发归档),之后再把归档日志和redo日志传给B机,最后再在B库上 restore 和recover
数据文件,控制文件,参数文件 的恢复过程:根据数据库的启动流程,可以知道最先读取数据文件,所以应该先还原参数文件,然后会读控制文件,所以你要再修复控制文件,最后再修复数据文件,
具体操作流程:
一:对A库做一个热全备,
RMAN> backup as backupset database include current controlfile plus archivelog format '/u01/app/oracle/arch_%U.rmn' delete all input;
省列。。。。
Finished backup at 14-AUG-14
二:把所做的备份用scp传给B机。 如红色命令会把A机的ENMOEDU接到B机的Oracle/下,,即Oracle/ENMOEDU
[
oracle@ENMOEDU ENMOEDU]$
scp -r /u01/app/oracle/fast_recovery_area/ENMOEDU oracle@192.168.80.11:/u01/app/oracle/
The authenticity of host '192.168.80.11 (192.168.80.11)' can't be established.
RSA key fingerprint is 54:78:71:4c:93:51:01:f4:e3:83:b5:35:8f:9f:d5:b1.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '192.168.80.11' (RSA) to the list of known hosts.
oracle@192.168.80.11's password:
o1_mf_nnndf_SECTION_DF1_9srh9o7k_.bkp 100% 148MB 36.9MB/s 00:04
o1_mf_ncnnf_SECTION_DF1_9srh9ws3_.bkp 100% 9568KB 9.3MB/s 00:01
o1_mf_nnndf_SECTION_DF1_9srh9n9o_.bkp 100% 97MB 24.2MB/s 00:04
o1_mf_nnsnf_SECTION_DF1_9srh9nml_.bkp 100% 96KB 96.0KB/s 00:00
o1_mf_nnndf_SECTION_DF1_9srh9o26_.bkp 100% 140MB 28.0MB/s 00:05
o1_mf_nnndf_SECTION_DF1_9srh9v71_.bkp 100% 145MB 29.0MB/s 00:05
o1_mf_nnndf_SECTION_DF1_9srhb0dh_.bkp 100% 81MB 27.0MB/s 00:03
o1_mf_ncsnf_TAG20140814T203309_9ysc8x14_.bkp 100% 9600KB 4.7MB/s 00:02
o1_mf_nnndf_TAG20140814T203309_9ysc46go_.bkp 100% 1140MB 24.3MB/s 00:47
control02.ctl 100% 9520KB 9.3MB/s 00:01
三:把A库数据库关闭,把归档和redo传给B机,(因为你备份的时候没有关闭数据库,难免会再产生新的归档和redo,为保证一致性,还有必要进行这步)
The authenticity of host '192.168.80.11 (192.168.80.11)' can't be established.
RSA key fingerprint is 54:78:71:4c:93:51:01:f4:e3:83:b5:35:8f:9f:d5:b1.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '192.168.80.11' (RSA) to the list of known hosts.
oracle@192.168.80.11's password:
o1_mf_nnndf_SECTION_DF1_9srh9o7k_.bkp 100% 148MB 36.9MB/s 00:04
o1_mf_ncnnf_SECTION_DF1_9srh9ws3_.bkp 100% 9568KB 9.3MB/s 00:01
o1_mf_nnndf_SECTION_DF1_9srh9n9o_.bkp 100% 97MB 24.2MB/s 00:04
o1_mf_nnsnf_SECTION_DF1_9srh9nml_.bkp 100% 96KB 96.0KB/s 00:00
o1_mf_nnndf_SECTION_DF1_9srh9o26_.bkp 100% 140MB 28.0MB/s 00:05
o1_mf_nnndf_SECTION_DF1_9srh9v71_.bkp 100% 145MB 29.0MB/s 00:05
o1_mf_nnndf_SECTION_DF1_9srhb0dh_.bkp 100% 81MB 27.0MB/s 00:03
o1_mf_ncsnf_TAG20140814T203309_9ysc8x14_.bkp 100% 9600KB 4.7MB/s 00:02
o1_mf_nnndf_TAG20140814T203309_9ysc46go_.bkp 100% 1140MB 24.3MB/s 00:47
control02.ctl 100% 9520KB 9.3MB/s 00:01
三:把A库数据库关闭,把归档和redo传给B机,(因为你备份的时候没有关闭数据库,难免会再产生新的归档和redo,为保证一致性,还有必要进行这步)
1.