A power outage causes Oracle's ORA-01207 error complete solution (Redo log file (redo log files) management (add, delete, change, check, cut)) ____oracle

Source: Internet
Author: User

When the hardware is maintained, someone accidentally disconnected the power supply from the production library, and after restarting the enclosure and server, an Oracle 10g 10.2.0.4 startup error message appears:

The code is as follows
1 Database loading complete.
ORA-01122: Database file 1 validation failed
ORA-01110: Data file 1: ' E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01. DBF '
ORA-01207: File newer than control file-old control file (file is more recent than Controlfile-old Controlfile)

Treatment methods:

Redo the log file.

Summarize the operations related to redo log file (redo log files) management (add, delete, change, check, cut). For reference.

1. Current Log related information
Sys@ora11g> select * from V$log;

group# thread# sequence# BYTES members ARC STATUS first_change# First_tim
---------- ---------- ---------- ---------- ---------- --- --------- ------------- ---------
1 1 209715200 1 YES INACTIVE 461938 09-mar-09
2 1 209715200 1 NO current 485885 09-mar-09
3 1 9 209715200 1 YES INACTIVE 432636 04-mar-09

Sys@ora11g> select * from V$logfile;

group# STATUS TYPE member Is_
---------- ------- -------------------- ---------------------------------------- ---
1 Online/oracle/u02/oradata/ora11g/redo01.log NO
2 Online/oracle/u02/oradata/ora11g/redo02.log NO
3 Online/oracle/u02/oradata/ora11g/redo03.log NO

2. Add Redo Log Group
Sys@ora11g>alter Database Add logfile Group 4 ('/oracle/u02/oradata/ora11g/redo04_01.log ', '/oracle/u02/oradata/ Ora11g/redo04_02.log ') size 50m;

Database altered.

Sys@ora11g> select * from V$log;

group# thread# sequence# BYTES members ARC STATUS first_change# First_tim
---------- ---------- ---------- ---------- ---------- --- --------- ------------- ---------
1 1 209715200 1 YES INACTIVE 461938 09-mar-09
2 1 209715200 1 NO current 485885 09-mar-09
3 1 9 209715200 1 YES INACTIVE 432636 04-mar-09
4 1 0 52428800 2 YES unused 0

Sys@ora11g> select * from V$logfile;

group# STATUS TYPE member Is_
---------- ------- -------------------- ---------------------------------------- ---
1 Online/oracle/u02/oradata/ora11g/redo01.log NO
2 Online/oracle/u02/oradata/ora11g/redo02.log NO
3 Online/oracle/u02/oradata/ora11g/redo03.log NO
4 Online/oracle/u02/oradata/ora11g/redo04_01.log NO
4 Online/oracle/u02/oradata/ora11g/redo04_02.log NO


3. Add log file
Sys@ora11g>alter Database Add LogFile Member
'/oracle/u02/oradata/ora11g/redo01_02.log ' to group 1,
'/oracle/u02/oradata/ora11g/redo02_02.log ' to group 2,
'/oracle/u02/oradata/ora11g/redo03_02.log ' to group 3;

Database altered.

Sys@ora11g> select * from V$log;

group# thread# sequence# BYTES members ARC STATUS first_change# First_tim
---------- ---------- ---------- ---------- ---------- --- --------- ------------- ---------
1 1 209715200 2 YES INACTIVE 461938 09-mar-09
2 1 209715200 2 NO current 485885 09-mar-09
3 1 9 209715200 2 YES INACTIVE 432636 04-mar-09
4 1 0 52428800 2 YES unused 0

Sys@ora11g> SELECT * from V$logfile order by 1;

group# STATUS TYPE member Is_
---------- ------- -------------------- ---------------------------------------- ---
1 Online/oracle/u02/oradata/ora11g/redo01.log NO
1 INVALID online/oracle/u02/oradata/ora11g/redo01_02.log NO
2 INVALID Online/oracle/u02/oradata/ora11g/redo02_02.log NO
2 Online/oracle/u02/oradata/ora11g/redo02.log NO
3 Online/oracle/u02/oradata/ora11g/redo03.log NO
3 INVALID Online/oracle/u02/oradata/ora11g/redo03_02.log NO
4 Online/oracle/u02/oradata/ora11g/redo04_02.log NO
4 Online/oracle/u02/oradata/ora11g/redo04_01.log NO

8 rows selected.

4. Renaming log Members
The new target must already exist before renaming the log group member. Oracle's SQL command simply points the internal pointer in the control file to the new log file.
1) Close the database
sys@ora11g> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

2 rename or move log files using operating system commands
ORA11G@RHEL53/ORACLE/U02/ORADATA/ORA11G$MV Redo01.log Redo01_01.log
ORA11G@RHEL53/ORACLE/U02/ORADATA/ORA11G$MV Redo02.log Redo02_01.log
ORA11G@RHEL53/ORACLE/U02/ORADATA/ORA11G$MV Redo03.log Redo03_01.log

3 Start the database instance to the Mount State and rename the log file members in the control file.
Notconnected@> SELECT * from V$logfile ORDER by 1, 4;

group# STATUS TYPE member Is_
---------- ------- -------------------- ------------------------------------------ ---
1 Online/oracle/u02/oradata/ora11g/redo01.log NO
2 Online/oracle/u02/oradata/ora11g/redo02.log NO
3 Online/oracle/u02/oradata/ora11g/redo03.log NO
4 Online/oracle/u02/oradata/ora11g/redo04_01.log NO
4 Online/oracle/u02/oradata/ora11g/redo04_02.log NO
1 Online/oracle/u02/oradata/ora11g/redo01_02.log NO
2 Online/oracle/u02/oradata/ora11g/redo02_02.log NO
3 Online/oracle/u02/oradata/ora11g/redo03_02.log NO

8 rows selected.

Notconnected@>alter database Rename file '/oracle/u02/oradata/ora11g/redo01.log ' to '/oracle/u02/oradata/ora11g/ Redo01_01.log ';

Database altered.

Notconnected@>alter database Rename file '/oracle/u02/oradata/ora11g/redo02.log ' to '/oracle/u02/oradata/ora11g/ Redo02_01.log ';

Database altered.

Notconnected@>alter database Rename file '/oracle/u02/oradata/ora11g/redo03.log ' to '/oracle/u02/oradata/ora11g/ Redo03_01.log ';

Database altered.

4 Open database, verify results
Notconnected@>alter database open;

Database altered.

Sys@ora11g> select * from V$log;

group# thread# sequence# BYTES members ARC STATUS first_change# First_tim
---------- ---------- ---------- ---------- ---------- --- -------- ------------- ---------
1 1 209715200 2 YES INACTIVE 486960 09-mar-09
2 1 209715200 2 YES INACTIVE 486964 09-mar-09
3 1 209715200 2 NO current 486973 09-mar-09
4 1 52428800 2 YES INACTIVE 486968 09-mar-09

Sys@ora11g> SELECT * from V$logfile ORDER by 1, 4;

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.