闪回数据库案例

xiaoxiao2021-02-28  117

闪回数据库案例

测试数据

create table sct4( id number(4), name varchar2(20) ); insert into sct4 values(1,'lili'); insert into sct4 values(2,'lilic'); commit; select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual; delete sct4 where id=1; commit; select * from sct4;

闪回数据库操作

shutdown immediate; startup mount; flashback database to timestamp(to_date('2017-06-07 11:38:20','yyyy-mm-dd hh24:mi:ss')); alter database open resetlogs ; select * from sct4;

1要先关闭数据库,在重启数据库,但不打开,闪回数据库恢复到某个时间点 2打开数据库,查看原有的数据

转载请注明原文地址: https://www.6miu.com/read-40085.html

最新回复(0)