闪回数据================================================
select*fromdc_std_codeasoftimestampsysdate-5/1440;
查找数据
select*fromdc_std_codeasoftimestampto_timestamp('2015-09-3016:03:00','YYYY-MM-DDhh24:mi:ss');
恢复数据
insertintodc_std_codeselect*fromdc_std_codeasoftimestampto_timestamp('16:03:00','YYYY-MM-DDhh24:mi:ss');
获取当前数据的svn918515
SELECTCURRENT_SCNFROMV$DATABASE;
查询svn的数据
select*fromdc_std_codeasofscn918515;
恢复数据
insertintodc_std_codeselect*fromAasofscn918515; alter tableDC_STD_CODEenable row movement
flashback tableDC_STD_CODETO TIMESTAMP to_timestamp('2015-09-3012:00:00','yyyy-mm-dd hh24:mi:ss');
FLASHBACK TABLE "BIN$04LhcpnoanfgMAAAAAANPw==$0" TO BEFORE DROP RENAME TOdc_std_code1;
FLASHBACK TABLE "BIN$04LhcpnqanfgMAAAAAANPw==$0" TO BEFORE DROP RENAME TOdc_std_code2;
@H_790_301@
清理回收站
@H_790_301@ Purgerecyclebin@H_790_301@
@H_790_301@ 闪回库============================================================== @H_790_301@ 开启恢复数据库功能 @H_790_301@ SHUTDOWN IMMEDIATE
@H_790_301@ STARTUP MOUNT
查看数据库状态
alterdatabaSEOpen;
shutdownimmediate
startupmount
恢复数据库到某一个时间点
Flashbackdatabasetotimestampto_timestamp('09-10-1414:37:05','yy-mm-ddhh24:mi:ss');
Flashbackdatabasetoscn947921;
alterdatabaSEOpen;
恢复记录日志
alterdatabaSEOpenresetlogs;
startup mount
recover database until time '2016-06-30:15:50:00'
alter database open resetlogs