1、启动数据库到mount状态。
2、开启数据库flashback闪回查询,然后启动数据库到open状态。
3、创建flashback还原点SQL>create restore point b4 guarantee flashback database;
4、解锁scott用户,删掉该用户的emp表;drop table emp purge;
5、关闭数据库,启动数据库到mount状态
6、在mount阶段闪回数据库到删除emp表之前的状态SQL>flashback database to timestamp to_timestamp('稆糨孝汶;2014-12-08 11:31:00','yyyy-mm-dd hh24:mi:ss');
7、启动数据库到readonly状态,查看emp表是否存在,此时发现emp已经回来了。SQL>alter database open read only;
8、到shell终端下导出找回的表格。$exp scott/tiger tables=emp file=emp.dmp
9、再次关闭数据库,然后启动到mount状态。
10、再次闪回数据库到删除emp表之后,关闭数据库之前。SQL>flashback data水瑞侮瑜base to timestamp to_timestamp('2014-12-08 12:00:00'),'yyyy-mm-dd hh24:mi:ss');闪回之后使用resetlogs方式打开数据库。
11、查看scott下的emp表,不存在。
12、回到shell终端,导入emp表$imp scott/tiger file=emp tables=emp
13、再次检查emp表。