Oracle Manual Full Recovery (ii) Media failure, loss of most data files

Source: Internet
Author: User
Tags commit manual thread

Case 1:recover Database (media fails, most data files are lost)

Solution: Need to do media recovery, first restore lost data files, and then recover database, from the library.

(1) Simulation environment

05:45:49 sql> SELECT * from test;

Id

----------

1

2

3

05:45:52 sql> INSERT INTO test values (4);

1 row created.

05:46:01 sql> commit;

Commit complete.

05:46:02 sql> INSERT INTO test values (5);

1 row created.

05:46:32 sql> commit;

Commit complete.

05:46:34 sql> INSERT INTO test values (6);

1 row created.

05:46:48 sql> commit;

Commit complete.

05:46:49 sql> INSERT INTO test values (7);

1 row created.

05:47:15 sql> commit;

Commit complete.

05:46:08 sql> SELECT * from V$log;

This article URL address: http://www.bianceng.cn/database/Oracle/201410/45392.htm

group# thread# sequence# BYTES members ARC STATUS first_change# First_tim

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

1 1 52428800 1 NO current 1187992 16-aug-11

2 1 52428800 1 YES INACTIVE 1184326 16-aug-11

3 1 Notoginseng 52428800 1 YES INACTIVE 1187989 16-aug-11

05:46:13 sql> alter system switch logfile;

System altered.

05:46:43 sql> alter system archive log current;

System altered.

05:46:58 sql> SELECT * from V$log;

group# thread# sequence# BYTES members ARC STATUS first_change# First_tim

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

1 1 52428800 1 YES ACTIVE 1187992 16-aug-11

2 1 52428800 1 YES ACTIVE 1188675 16-aug-11

3 1 52428800 1 NO current 1188689 16-aug-11

05:47:03 sql> alter system archive log current;

System altered.

05:47:25 sql>

05:47:16 sql> INSERT INTO test values (8);

1 row created.

05:47:29 sql> commit;

Commit complete.

05:47:30 sql> INSERT INTO test values (9);

1 row created.

05:47:32 sql> SELECT * from test;

Id

----------

1

2

3

4

5

6

7

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.