快捷搜索:   nginx

oracle数据库rman备份计划及恢复(2)

 

 

d.在伪实例下恢复spfile文件(必须要指定rman的备份片):

 

 


RMAN> restore spfile from "/u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp";

 

Starting restore at 14-DEC-15

using channel ORA_DISK_1

 

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp

channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete

Finished restore at 14-DEC-15

 

 

e.关闭伪实例,用spfile文件启动至nomount状态:

 

 


RMAN> shutdown abort

 

Oracle instance shut down

 

RMAN> startup nomount

 

connected to target database (not started)

Oracle instance started

 

Total System Global Area    1068937216 bytes

 

Fixed Size                     2260088 bytes

Variable Size                910164872 bytes

Database Buffers             150994944 bytes

Redo Buffers                   5517312 bytes

 

 

f.恢复控制文件(必须要指定rman的备份片,备份片应该和spfile的恢复片是同一个):

 

 


RMAN> restore controlfile from "/u01/ora_bak/ora_bak/autobackup/2015_12_07/o1_mf_s_897845728_c6bnq1rq_.bkp";

 

Starting restore at 14-DEC-15

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=1146 device type=DISK

 

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

output file name=/u01/app/oracle/oradata/ATEST/controlfile/o1_mf_c5fr9b0h_.ctl

output file name=/u01/app/oracle/fast_recovery_area/ATEST/controlfile/o1_mf_c5fr9b6n_.ctl

Finished restore at 14-DEC-15

 

 

g.启动数据库至mount状态:

 


RMAN> alter database mount;

 

database mounted

released channel: ORA_DISK_1

 

 

h.把拷贝到新机器的备份文件注册到(刚恢复的)控制文件中(redolog不能被注册,所以最后有报错,没有关系):

 

 


RMAN> catalog start with "/u01/ora_bak";

Starting implicit crosscheck backup at 14-DEC-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1146 device type=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 14-DEC-15

Starting implicit crosscheck copy at 14-DEC-15
using channel ORA_DISK_1
Finished implicit crosscheck copy at 14-DEC-15

searching 
顶(6)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论