案例3——在做完全恢复时,丢失了部分归档日志 (recover database until cancel;)
1、基于cancel 的不完全恢复
——模拟环境
SQL> col table_name for a20
SQL> col tablespace_name for a10
SQL> select table_name,tablespace_name from user_tables;
TABLE_NAME TABLESPACE
-------------------- ----------
DEPT USERS
EMP USERS
BONUS USERS
SALGRADE USERS
EMPLOYEES USERS
EMP2 USERS
TB02 CUUG
TB01 TEST
ADMIN_EXT_EMPLOYEES
EMP1 USERS
10 rows selected.
SQL> conn /as sysdba
Connected.
SQL> select * from scott.tb02;
ID
----------
1
2
3
4
5
6
7
8
8 rows selected.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARCHIVED STATUS FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- --------- ------------ ------------- -------------------
1 1 1 104857600 3 YES INACTIVE 851230 2012-03-23 16:04:13
4 1 4 104857600 3 NO CURRENT 851518 2012-03-23 16:13:25
3 1 3 104857600 3 YES INACTIVE 851509 2012-03-23 16:13:09
2 1 2 104857600 3 YES INACTIVE 851500 2012-03-23 16:12:53
SQL> insert into scott.tb02 values(9);
1 row created.
SQL> commit;
Commit complete.
SQL> alter system archive log current;
System altered.
SQL> insert into scott.tb02 values(10);
1 row created.
SQL> commit;
Commit complete.
SQL> alter system archive log current;
System altered.
SQL> insert into scott.tb02 values(11);
1 row created.
SQL> commit;
Commit complete.
SQL> alter system archive log current;
System altered.
SQL> select name from v$archived_log;
NAME
--------------------------------------------------
查看本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/