Perform catastrophic recovery-1 and perform disaster-1

Source: Internet
Author: User

Perform catastrophic recovery-1 and perform disaster-1
Perform disaster recovery:
[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,201 0, Oracle. All Rights Reserved.
Connected:
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
* ** Note: This file cannot be deleted. If deleted, it cannot be restored ***
[Oracle @ oracle ~] $ Ls/u01/oracle/flash_recovery_area/JADL10G/

Archivelog backupset datafile onlinelog

Fault Simulation completed: start recovery;

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

RMAN> startup nomount
Startup failure: ORA-01078: failure in processing system parameters
LRM-00109: cocould 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_recovery_file_dest = '/u01/oracle/flash_recovery_area'
*. Db_recovery_file_dest_size = 2147483648
*. Dispatchers = '(PROTOCOL = TCP) (SERVICE = jadl10gXDB )'
*. Job_queue_processes = 10
*. Log_archive_format = '% t _ % s _ % r. dbf'
*. Open_cursors = 300
*. Pga_aggregate_target = 199229440
*. Processses = 150
*. Remote_login_passwordfile = 'clusive'
*. Sga_target = 597688320
*. Undo_management = 'auto'
*. Undo_tablespace = 'undotbs1'
*. User_dump_dest = '/u01/oracle/admin/jadl10g/udump'
[Oracle @ oracle ~] $ Mkdir/u01/oracle/admin/jadl10g/{a, B, c, u} dump-p
[Oracle @ oracle ~] $ Mkdir/u01/oracle/oradata/jadl10g
[Oracle @ oracle ~] $ Mkdir/u01/oracle/flash_recovery_area/jadl10g
[Oracle @ oracle ~] $ Rman target/
Recovery Manager: Release 10.2.0.5.0-Production on Thu Nov 6 20:35:03 2014
Copyright (c) 1982,200 7, Oracle. All rights reserved.
Connected to target database (not started)
RMAN> startup nomount
Connected to target database (not started)
Oracle instance started
Total System Global Area 599785472 bytes
Fixed Size 2098112 bytes
Variable Size 163580992 bytes
Database Buffers 427819008 bytes
Redo Buffers 6287360 bytes

RMAN> restore controlfile from '/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T202102_b5psyngf _. bkp ';
Starting restore at 06-NOV-14
Using channel ORA_DISK_1
Channel ORA_DISK_1: restoring control file
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
Output filename =/u01/oracle/oradata/jadl10g/control01.ctl
Output filename =/u01/oracle/flash_recovery_area/jadl10g/control02.ctl
Finished restore at 06-NOV-14

RMAN> alter database mount;
Database mounted
Released channel: ORA_DISK_1

RMAN> restore database;
Starting restore at 06-NOV-14
Starting implicit crosscheck backup at 06-NOV-14
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 156 devtype = DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 06-NOV-14
Starting implicit crosscheck copy at 06-NOV-14
Using channel ORA_DISK_1
Crosschecked 1 objects
Finished implicit crosscheck copy at 06-NOV-14
Searching for all files in the recovery area
Cataloging files...
Cataloging done
List of Cataloged Files
======================================
File Name:/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T202102_b5psyngf _. bkp
Using channel ORA_DISK_1
Channel ORA_DISK_1: starting datafile backupset restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Restoring datafile 00001 to/u01/oracle/oradata/jadl10g/system01.dbf
Restoring datafile 00002 to/u01/oracle/oradata/jadl10g/undotbs01.dbf
Restoring datafile 00003 to/u01/oracle/oradata/jadl10g/sysaux01.dbf
Restoring datafile 00004 to/u01/oracle/oradata/jadl10g/users01.dbf
Restoring datafile 00005 to/u01/oracle/oradata/jadl10g/example01.dbf
Channel ORA_DISK_1: reading from backup piece/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T202102_b5psxhko _. bkp
Channel ORA_DISK_1: restored backup piece 1
Piece handle =/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/empty _. bkp tag = TAG20141106T202102
Channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 06-NOV-14

RMAN> recover database;
Starting recover at 06-NOV-14
Using channel ORA_DISK_1
Starting media recovery
Unable to find archive log
Archive log thread = 1 sequence = 1
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of recover command at 11/06/2014 20:39:55
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1 lowscn 485958

RMAN> recover database until scn 485958;
Starting recover at 06-NOV-14
Using channel ORA_DISK_1
Starting media recovery
Unable to find archive log
Archive log thread = 1 sequence = 1
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of recover command at 11/06/2014 20:40:17
RMAN-06054: media recovery requesting unknown log: thread 1 seq 1 lowscn 485958

RMAN> recover database noredo;
Starting recover at 06-NOV-14
Using channel ORA_DISK_1
Finished recover at 06-NOV-14

RMAN> alter database open resetlogs;
Database opened

RMAN> exit
Recovery Manager complete.
[Oracle @ oracle ~] $ Sqlplus/as sysdba
SQL * Plus: Release 10.2.0.5.0-Production on Thu Nov 6 20:47:03 2014
Copyright (c) 1982,201 0, Oracle. All Rights Reserved.
Connected:
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> select name from v $ datafile;
NAME
--------------------------------------------------------------------------------
/U01/oracle/oradata/jadl10g/system01.dbf
/U01/oracle/oradata/jadl10g/undotbs01.dbf
/U01/oracle/oradata/jadl10g/sysaux01.dbf
/U01/oracle/oradata/jadl10g/users01.dbf
/U01/oracle/oradata/jadl10g/example01.dbf

Backup files do not need to be deleted, and redundant backup is retained on the backup device.
Do not delete archived logs on backup devices.
Log files must be opened separately. Do not cause all log file members to be lost.
Data File loss is faulty and can be recovered.
Use the rebuild control file to restore the backup control file, and resetlogs needs to back up the backup database again to open the database;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.