å为两ç§æ¹æ³ï¼scnåæ¶é´æ³ä¸¤ç§æ¹æ³æ¢å¤ã
ä¸ãéè¿scnæ¢å¤å é¤ä¸å·²æ交çæ°æ®
1ãè·å¾å½åæ°æ®åºçscnå·
select current_scn from v$database; (åæ¢å°sysç¨æ·æsystemç¨æ·æ¥è¯¢)
æ¥è¯¢å°çscnå·ä¸ºï¼1499223
2ãæ¥è¯¢å½åscnå·ä¹åçscn
select * from 表å as of scn 1499220; (ç¡®å®å é¤çæ°æ®æ¯å¦åå¨ï¼å¦æåå¨ï¼åæ¢å¤æ°æ®ï¼å¦æä¸æ¯ï¼å继ç»ç¼©å°scnå·)
3ãæ¢å¤å é¤ä¸å·²æ交çæ°æ®
flashback table 表å to scn 1499220;
äºãéè¿æ¶é´æ¢å¤å é¤ä¸å·²æ交çæ°æ®
1ãæ¥è¯¢å½åç³»ç»æ¶é´
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
2ãæ¥è¯¢å é¤æ°æ®çæ¶é´ç¹çæ°æ®
select * from 表å as of timestamp to_timestamp('2013-05-29 15:29:00','yyyy-mm-dd hh24:mi:ss'); (å¦æä¸æ¯ï¼å继ç»ç¼©å°èå´)
3ãæ¢å¤å é¤ä¸å·²æ交çæ°æ®
flashback table 表å to timestamp to_timestamp('2013-05-29 15:29:00','yyyy-mm-dd hh24:mi:ss');
注æï¼å¦æå¨æ§è¡ä¸é¢çè¯å¥ï¼åºç°é误ãå¯ä»¥å°è¯æ§è¡ alter table 表å enable row movement; //å
许æ´æ¹æ¶é´æ³
温馨提示:答案为网友推荐,仅供参考