Oracle no backup restores various scenarios

Source: Internet
Author: User
Tags log log log backup

1. Recover password file
Orapwd file= $ORACLE _HOME/DBS/ORAPWOCP password=oracle force=y ignorecase=y;

--Note: whether the common user's password is case-sensitive and Sec_case_sensitive_logon by the initial parameter, and not the password file processing

2. Recovery parameter file

Find Alert_sid.log Log

3. No backup control files
Scenario 1: Reconstruction of online logs without compromising
RM-RF control*
Shutdown abort;
Startup Nomount;
CREATE controlfile Reuse DATABASE "Bxdb" Noresetlogs ...
Reocver database;
ALTER DATABASE open;
ALTER tablespace TEMP ADD tempfile '/u01/app/oracle/oradata/bxdb/temp01.dbf ' reuse;
Scenario 2: Rebuilding in case of online log corruption
Shutdown immediate; -Note that the database should be shut down properly, otherwise the system will be required to do the recovery???
RM-RF control*
RM-RF redo*
Startup Nomount;
CREATE controlfile Reuse DATABASE "Bxdb" Resetlogs ...
Recover database until cancel using BACKUP controlfile;--rman>recover database until sequence 2;
ALTER DATABASE open resetlogs;
ALTER tablespace TEMP ADD tempfile '/u01/app/oracle/oradata/bxdb/temp01.dbf ' reuse;
Scenario 3: Rebuilding with read-only data files
Startup Nomount;
CREATE controlfile Reuse DATABASE "Bxdb" Noresetlogs ...
Recover database; --recover database using Backup controlfile;
ALTER DATABASE open; --alter database open resetlogs;
Alter DATABASE rename file '/u01/app/oracle/product/11g/dbs/missing00005 ' to '/u01/app/oracle/oradata/bxdb/tp2.dbf ';
Alter Tablespace TP12 Online; --Cannot set up data file online (ALTER DATABASE datafile 7;)
ALTER tablespace TEMP ADD tempfile '/u01/app/oracle/oradata/ocp/temp01.dbf ' reuse;
Scenario 4: Using Control file Snapshot recovery
Cp/u01/app/oracle/product/11g/dbs/snapcf_ocp.f/u01/app/oracle/oradata/ocp/control01.ctl
Cp/u01/app/oracle/product/11g/dbs/snapcf_ocp.f/u01/app/oracle/oradata/ocp/control02.ctl
Cp/u01/app/oracle/product/11g/dbs/snapcf_ocp.f/u01/app/oracle/oradata/ocp/control03.ctl
startup Mount;
Recover database using Backup controlfile; --rman>recover database;

ALTER DATABASE open resetlogs;

4. Recover Data files
RM-RF tp5.dbf;
ALTER DATABASE datafile 8 offline;
ALTER DATABASE create datafile '/u01/app/oracle/oradata/ocp/tp12.dbf ';
SELECT * from T20; No file found---error
Recover DataFile 8;

ALTER DATABASE datafile 8 online;

5. Restoration of temporary documents
Alter TABLESAPCE temp add tempfile '/u01/app/oracle/oradata/oca/temp02.dbf ' size 20M autoextend on;

Alter TABLESAPCE temp drop tempfile '/u01/app/oracle/oradata/oca/temp01.dbf ';

6. Redo Online Redo Log
Scenario 1: Each log group has two online log members, and group 1th is one of the redo01B.log damaged
ALTER DATABASE drop logfile member '/u01/app/oracle/oradata/oca/redo01b.log ';
ALTER DATABASE add logfile member '/u01/app/oracle/oradata/oca/redo01b.log ' to group 1;
Scenario 2: Each log group has two online log members, and all logs in Group 1th (Redo01A.log and Redo01B.log) are corrupted
ALTER DATABASE clear logfile Group 1;
ALTER DATABASE Clear unarchived logfile Group 1;
Scenario 3: All log groups are corrupted
RM-RF redo*
Shutdown immediate;
startup Mount;
Recover database until cancel;

ALTER DATABASE open resetlogs;

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/database/storage/

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.