oracle flashback查找当前的scn值
oracle flashback查找当前的scn值
1.查找当前的scn的值
SELECT dbms_flashback.get_system_change_number from dual;
假设返回值:140856480
2.统计或查看当前scn值的记录
SELECT count(*) from qt_exame_ver as of scn 140856480;
SELECT * from qt_exame_ver as of scn 140856480;
3.统计或查看当前scn值的记录
SELECT count(*) from qt_exame_ver as of scn 140856000;
SELECT * from qt_exame_ver as of scn 140856000;
一直找到一个合适的scn值,假设是:140848000
4.开启行移动功能,只有开启行移动功能才能对表做闪回
alter table qt_exame_ver enable row movement;
flashback table qt_exame_ver to scn 140848000;
如不支持闪回表,可以使用手动插入
INSERT INTO qt_exame_ver SELECT * from qt_exame_ver as of scn 140848000 where msg_id=18838;
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。