Oracle很强大,如果把数据错误删除,可以通过把以前update前的表做恢复。
查找scn号:
select START_SCN,COMMIT_SCN from flashback_transaction_query
where TABLE_NAME='table_name'
and rownum<=10;
操作1
创建新表:
create table table_name_new
as
select * from table_name as of scn scn_number(COMMIT_SCN-1);
与原表对比数据后修改数据;
操作2:
select START_SCN,COMMIT_SCN,UNDO_SQL from flashback_transaction_query
where TABLE_NAME='table_name'
and rownum<=10;
查找更改的数据,运行undo_sql。
阅读(1498) | 评论(0) | 转发(0) |