to flashback update
select * from v$database;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ALTER DATABASE DROP SUPPLEMENTAL LOG DATA;
alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS';
begin
dbms_logmnr.start_logmnr
(
starttime => '27-JAN-2011 11:25:10',
endtime => '27-JAN-2011 11:28:35',
options => dbms_logmnr.dict_from_online_catalog +
dbms_logmnr.continuous_mine +
dbms_logmnr.no_sql_delimiter +
dbms_logmnr.print_pretty_sql
);
end;
/
select seg_name ,seg_owner ,username, xid , operation , sql_redo
from v$logmnr_contents
where seg_owner = 'CCARE'
and username = 'DBAHAKKI';
--where seg_name like 'ACC' ;
-- from sys user
execute dbms_logmnr.end_logmnr;
begin
dbms_flashback.TRANSACTION_BACKOUT
(
numtxns => 1 ,
xids => xid_array('01001900A70C0000'),
options => DBMS_FLASHBACK.CASCADE
);
end;
/
--to flashback delete
select * from table_name as of timestamp to_timestamp(‘2011-01-19 16:00:00’,’yyyy-mm-dd hh24:mi:ss’);
insert into table_name
select * from table_name as of timestamp to_timestamp(‘2011-01-19 16:00:00’,’yyyy-mm-dd hh24:mi:ss’);
SQL>commit;
No comments:
Post a Comment