Controlled file (control) mistakenly deleted recovery method (ora-00283/ora-01610 problem)

Source: Internet
Author: User

First:
To figure out the difference between resetlogs and noresetlogs
Norestlogs, the SCN of the control file is the high SCN from the current log, and the SCN of the Resetlogs control file is from the data file.


Second:
How to get the script to create the control file as follows:

Sql>alter database backup to trace;


Then the script that queries the trace file can query the relevant details

sql> SELECT a.value| | b.symbol| | c.instance_name| | ' _ora_ ' | | d.spid| | '. TRC ' Trace_file_name
    from (select VALUE from V$parameter WHERE name= ' user_dump_dest ') A,
        (select SUBSTR (value,- 6,1) symbol from V$parameter WHERE name= ' user_dump_dest ') b,
         (select instance_name from V$instance) C,
         (select SP ID from v$session s,v$process p,v$mystat m
          WHERE s.paddr=p.addr and S.sid=m.sid) d
    /

TRACE _file_name
---------------------------------------------------------------------------------------------
E:\ORACLE\PRODUCT\10.2.0\ADMIN\ORCL\UDUMP\ORCL_ORA_5724.TRC


In this ORCL_ORA_5724.TRC script you can find two ways to create a control file noresetlogs/resetlogs.

Third: Simulate the process of error
Shutdown abort to do the shutdown according to the library.
IV: Use Noresetlogs to make control files and restore the database
1. Boot to database for Nomount state
Sql>startup Nomount;
2. Start creating control files
CREATE controlfile Reuse DATABASE "ORCL" Noresetlogs archivelog maxlogfiles 3 maxlogmembers 1 Maxinstances 8 maxloghistory 292 LOGFILE GROUP 1 ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01. LOG ' SIZE 50M, GROUP 2 ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02. LOG ' SIZE 50M, GROUP 3 ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03. LOG ' SIZE 50M--STANDBY LOGFILE datafile ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\FTITEM10G01 ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EYGLE01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\FTTEST01 ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS02. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\ZXF1. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATa\orcl\zxf2. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TZX01. DBF ' CHARACTER SET ZHS16GBK;


3.recover database; Restore Database
4. Open database alter DB open;
Since Noresetlogs is recovered with the high SCN of the current log, there is basically no problem.

IV: Using Resetlogs to perform control files and database recovery, some of the problems that arise here
1.shutdown Abort
2. Database boot to Nomount state
3. Create control File
CREATE controlfile Reuse DATABASE "ORCL" Resetlogs archivelog maxlogfiles 3 maxlogmembers 100 Maxinstances 8 maxloghistory 292 LOGFILE GROUP 1 ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01. LOG ' SIZE 50M, GROUP 2 ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02. LOG ' SIZE 50M, GROUP 3 ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03. LOG ' SIZE 50M--STANDBY LOGFILE datafile ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\FTITEM10G01 ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EYGLE01. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\FTTEST01 ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS02. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\ZXF1. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\orcl\zxf2. DBF ', ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\TZX01. DBF ' CHARACTER SET ZHS16GBK;


4.alter database Mount; To boot the database to mount state
5. sql> Recover database;
ORA-00283: Recovery session canceled due to error
ORA-01610: Recovery using the BACKUP controlfile option must be complete
Because of the resetlogs approach, there will be errors like this
You need to recover in the following way
sql> Recover database using Backup controlfile until cancel;
ORA-00279: Change 6432534 (generated at 06/22/2008 16:39:31) is required for thread 1
ORA-00289: Suggestions:
E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2008_06_22\O1_MF_1_
13_%u_. ARC
ORA-00280: Change 6432534 (for thread 1) in the sequence #13


Specify log: {<ret>=suggested | AUTO | CANCEL}

Here are a few options
Suggested: In the above ORA-00289: suggest: ..... Will be restored by this file.
FileName: Specify log file Yourself
Auto: Automatic selection, but I personally feel like suggestted: (
Cancel: This can not be recovered from media.

I choose Auto and suggested here, the report error is as follows:
Specify log: {<ret>=suggested | AUTO | CANCEL}
Auto
ORA-00308: Unable to open archive log ' e:oracleproduct10.2.0flash_recovery_areaorclarchivelog2008_06_22
ORA-27041: Unable to open file
OSD-04002: Unable to open file
O/s-error: (OS 2) The system could not find the specified file.

The following error is used in the Cancel report:
ORA-01112: Media Recovery not started

After these steps, we found that:
My archive log here requires that the log file does not exist
Specify log: {<ret>=suggested | AUTO | CANCEL}
E:oracleproduct10.2.0flash_recovery_areaorclarchivelog2008_06_22o1_mf_1_9_45w1nqdp_. ARC
ORA-00310: Archive log contains sequence 9; Requirement Sequence 10
ORA-00334: Archive log:
' E:oracleproduct10.2.0flash_recovery_areaorclarchivelog2008_06_22o1_mf_1
_9_45w1nqdp_. ARC '

To view the log file:
SELECT * from V$log;
group# thread# sequence# BYTES members ARC STATUS
------ ---------- ---------- ---------- ---------- --- --------
1 1 0 52428800 1 YES unused
3 1 0 52428800 1 YES current
2 1 0 52428800 1 YES unused
Found that there is a problem with the understanding, because the use of resetlogs, so the log file is definitely unused, ah, here to thank Cotton candy.

6. Take a closer look at Eygle's book.
"If the online log is not corrupted, you can specify an online log file to perform recovery", and then cotton candy points to this:
"Oh, forget you are Resetlogs, your online diary is still in the bar, the path of the online log input ah, such as d:oracleproduct10.2.0oradatatestredo01.log, you put all the log test past, One should be able to do the recovery.
After trying again, I finally succeeded.


sql> Recover database using Backup controlfile until cancel;
ORA-00279: Change 6432534 (generated at 06/22/2008 16:39:31) is required for thread 1
ORA-00289: Suggestions:
E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2008_06_22\O1_MF_1_
13_%u_. ARC
ORA-00280: Change 6432534 (for thread 1) in the sequence #13


Specify log: {<ret>=suggested | AUTO | CANCEL}
E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03. LOG
ORA-00310: Archive log contains sequence 12; Requirement Sequence 13
ORA-00334: Archive log: ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO03. LOG '


sql>  recover database using Backup controlfile until cancel;

ORA-00279: Change 6432534 (generated at 06/22/2008 16:39:31) is required for thread 1
ORA-00289: Suggestions:
E:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\2008_06_22\O1_MF_1_
13_%u_. ARC
ORA-00280: Change 6432534 (for thread 1) in the sequence #13


Specify log: {<ret>=suggested | AUTO | CANCEL}
E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02. LOG
The log that has been applied.
Complete media recovery.


sql> ALTER DATABASE open;

ALTER DATABASE Open
*
Line 1th Error:
ORA-01589: You must use the Resetlogs or Noresetlogs option to open the database
sql> ALTER DATABASE open resetlogs;

The database has changed.

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.