Restoration of Oracle lost inactive log files

Source: Internet
Author: User
Loss of inactive log group fault recovery if the database is missing a non-active log group, the database will not suffer data loss because the inactive log group has completed the checkpoint.

Loss of inactive log group fault recovery if the database is missing a non-active log group, the database will not suffer data loss because the inactive log group has completed the checkpoint.

Fault recovery for loss of inactive log groups
If the database loses a non-active log group, because the inactive log group has completed the checkpoint,
The database does not suffer data losses. In this case, you only need to re-create the log group through clear to restore the log group.
Delete an inactive log group to simulate a fault loss:
SQL>! Rm/u01/app/Oracle/product/10.2.0/oradata/jingyong/redo03.log

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

When the database is started, the database will prompt log loss
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 1218316 bytes
Variable Size 67111156 bytes
Database Buffers 96468992 bytes
Redo Buffers 2973696 bytes
Database mounted.
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1:
'/U01/app/oracle/product/10.2.0/oradata/jingyong/redo03.log'

In the mount status, you can view the status of each log group and log file:
SQL> select * from v $ log;

GROUP # THREAD # SEQUENCE # BYTES MEMBERS ARC STATUS
---------------------------------------------------------------------
FIRST_CHANGE # FIRST_TIME
-------------------------
1 1 26 52428800 1 NO INACTIVE
913689 06-JAN-13

3 1 28 52428800 1 NO CURRENT
913701 06-JAN-13

2 1 27 52428800 1 NO INACTIVE
913696 06-JAN-13


SQL> select * from v $ logfile;

GROUP # STATUS TYPE
------------------------
MEMBER
--------------------------------------------------------------------------------
IS _
---
3 ONLINE
/U01/app/oracle/product/10.2.0/oradata/jingyong/redo03.log
NO

2 ONLINE
/U01/app/oracle/product/10.2.0/oradata/jingyong/redo02.log
NO

GROUP # STATUS TYPE
------------------------
MEMBER
--------------------------------------------------------------------------------
IS _
---

1 ONLINE
/U01/app/oracle/product/10.2.0/oradata/jingyong/redo01.log
NO

,

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.