Oralce Recovery in non-archive mode (ii) log is switched and history log is overwritten

Source: Internet
Author: User
Tags commit log thread

Case 2: The log is switched and the history log is overwritten (only incomplete recovery is possible)

1) Simulation Environment

sql> INSERT into SCOTT.TB01 values (777);

1 row created.

sql> INSERT INTO SCOTT.TB01 values (888);

1 row created.

Sql> commit;

Commit complete.

Sql> col status for A10

Sql> select * from V$log;

group# thread# sequence# BYTES members archived STATUS first_change#

---------- ---------- ---------- ---------- ---------- --------- ---------- ------------- -------------------

1 1 104857600 3 NO INACTIVE 845923 2012-03-22 14:53:47

4 1 8 104857600 3 YES INACTIVE 801096 2012-03-21 18:22:29

3 1 9 104857600 3 YES INACTIVE 821972 2012-03-22 11:42:07

2 1 104857600 3 NO current 866474 2012-03-22 15:22:09

sql> alter system switch logfile;

System altered.

sql> alter system switch logfile;

System altered.

sql> alter system switch logfile;

System altered.

sql> alter system switch logfile;

System altered.

Sql> select * from V$log;

group# thread# sequence# BYTES members archived STATUS first_change#

---------- ---------- ---------- ---------- ---------- --------- ---------- ------------- -------------------

1 1 104857600 3 NO INACTIVE 866795 2012-03-22 15:25:45

4 1 104857600 3 NO current 866803 2012-03-22 15:26:04

3 1 104857600 3 NO INACTIVE 866787 2012-03-22 15:25:25

2 1 104857600 3 NO INACTIVE 866798 2012-03-22 15:25:53

Sql> select * from SCOTT.TB01;

Id

----------

444

555

666

888

111

222

333

777

8 rows selected. --The log has been overwritten

sql> Shutdown Abort

ORACLE instance shut down.

Sql>!

[ORACLE@SOLARIS10 ~] $rm/u01/app/oracle/oradata/anny/test*.dbf

2) Start the database

Sql> Startup

ORACLE instance started.

Total System Global area 314572800 bytes

Fixed Size 1279964 bytes

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

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.