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