日期:2014-05-16  浏览次数:20587 次

探索ORACLE不完全恢复之--基于检查点恢复 第二篇

探索ORACLE不完全恢复之--基于检查点恢复 第二篇

作者:吴伟龙   Name:Prodence Woo

QQ:286507175  msn:hapy-wuweilong@hotmail.com



基于SCN的恢复,第二篇

 

1、察看当前的SCN,以便于后期数据丢失用来恢复:

SQL> select current_scn from v$database;

 

CURRENT_SCN

-----------

    1511297

 

SQL> select file#,checkpoint_change#from v$datafile;

 

    FILE# CHECKPOINT_CHANGE#

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

        1            1510535

        2            1510535

        3            1510535

        4            1510535

        5            1510535

         6            1510535

        7            1510535

 

7 rows selected.

 

SQL> col name format a45

SQL> set line 300

SQL> select name,checkpoint_change# fromv$datafile_header;

 

NAME                                         CHECKPOINT_CHANGE#

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

/DBBak2/oradata/WWL/system01.dbf                         1510535

/DBBak2/oradata/WWL/undotbs01.dbf                        1510535

/DBBak2/oradata/WWL/sysaux01.dbf                         1510535

/DBBak2/oradata/WWL/users01.dbf                          1510535

/DBBak2/oradata/WWL/wwl01.dbf                            1510535

/DBBak2/oradata/WWL/wwl02.dbf                            1510535

/DBBak2/oradata/WWL/wwl03.dbf                            1510535

 

7 rows selected.

 

SQL>

 

2、删除测试表

SQL> drop table wwl002 purge;

 

Table dropped.

 

SQL> drop table wwl003 purge;

 

Table dropped.

 

SQL> drop table wwl004 purge;

 

Table dropped.