【执行灾难性恢复-1】(一)

2015-01-27 22:40:38 · 作者: · 浏览: 70
执行灾难恢复:
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 20:23:30 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options

SQL> shutdown abort
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
[oracle@oracle ~]$ rm /u01/oracle/oradata/jadl10g/ -rf
[oracle@oracle ~]$ rm /u01/oracle/admin/jadl10g/ -rf
[oracle@oracle ~]$ rm /u01/oracle/flash_recovery_area/jadl10g/ -rf
[oracle@oracle ~]$ ls /u01/oracle/10g/dbs/
ab_+ASM.dat hc_jadl10g.dat init.ora orapw+ASM snapcf_jadl10g.f
alert_jadl10g.log initd10g.ora lk+ASM orapwd10g spfile+ASM.ora
hc_+ASM.dat initdw.ora lkJADL10G orapwjadl10g spfilejadl10g.ora
[oracle@oracle ~]$ rm /u01/oracle/10g/dbs/*jadl10g* -rf
***注意该文件不能删除,如果删除了就不能恢复了***
[oracle@oracle ~]$ ls /u01/oracle/flash_recovery_area/JADL10G/
archivelog backupset datafile onlinelog

故障模拟完毕:开始执行恢复操作;

[oracle@oracle ~]$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Nov 6 20:30:19 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)

RMAN> startup nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/oracle/10g/dbs/initjadl10g.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 2094736 bytes
Variable Size 67111280 bytes
Database Buffers 83886080 bytes
Redo Buffers 6291456 bytes

RMAN>
restore spfile from '/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T202102_b5psyngf_.bkp'; Starting restore at 06-NOV-14 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=36 devtype=DISK channel ORA_DISK_1: autobackup found: /u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T202102_b5psyngf_.bkp channel ORA_DISK_1: SPFILE restore from autobackup complete Finished restore at 06-NOV-14 RMAN> shutdown abort; Oracle instance shut down RMAN> exit Recovery Manager complete. [oracle@oracle ~]$ strings $ORACLE_HOME/dbs/spfilejadl10g.ora jadl10g.__db_cache_size=427819008 jadl10g.__java_pool_size=4194304 jadl10g.__large_pool_size=4194304 jadl10g.__shared_pool_size=155189248 jadl10g.__streams_pool_size=0 *.audit_file_dest='/u01/oracle/admin/jadl10g/adump' *.background_dump_dest='/u01/oracle/admin/jadl10g/bdump' *.compatible='10.2.0.5.0' *.control_files='/u01/oracle/oradata/jadl10g/control01.ctl','/u01/oracle/flash_recovery_area/jadl10g/control02.ctl'#Restore Controlfile *.core_dump_dest='/u01/oracle/admin/jadl10g/cdump' *.db_block_size=8192 *.db_domain='' *.db_file_multiblock_read_count=16 *.db_name='jadl10g' *.db