Oracle Flashback Data Archive (FDA)

 

https://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/4421812.pdf

--https://docs.oracle.com/en/database/oracle/oracle-database/19/adfns/flashback.html#GUID-06AA782A-3F79-4235-86D5-2D136485F093
exec DBMSFLASHBACKARCHIVE.SETCONTEXTLEVEL ('ALL');
-- https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-FLASHBACK-ARCHIVE.html#GUID-9E821EC5-8350-4729-85FE-2188EBB4139B

--grant FLASHBACK ARCHIVE ADMINISTER to PRD;
CREATE FLASHBACK ARCHIVE testarchive1
TABLESPACE stofina
RETENTION 1 YEAR;

CREATE TABLE TEST
FLASHBACK
(
CAMPO1 VARCHAR2(50)
, CAMPO02DATE DATE
, CAMPO03
NUM NUMBER
, CAMPO04CLOB CLOB
);

ALTER TABLE TESTFLASHBACK
FLASHBACK ARCHIVE testarchive1;


begin
for i in 1 .. 500 loop
insert into TEST
FLASHBACK values ('ID: '||i,sysdate,i, sysdate||' campo clob '||i||user);
update TESTFLASHBACK set CAMPO04CLOB = CAMPO04CLOB|| ' Update seq:'||i, CAMPO02DATE=CAMPO02DATE+i
where CAMPO03
NUM=i-1;
commit;
end loop;
end;
/
select * from dbaFLASHBACKARCHIVETABLES ;

select * from dbaFLASHBACKARCHIVETS;

select * from dbaFLASHBACKARCHIVE;
select * from TESTFLASHBACK as of timestamp sysdate - 1/24;

select * from SYSFBAHIST312816;

/* What between yesterday and now? /
select DBMSFLASHBACKARCHIVE.getsyscontext(versionsxid, 'KLERSCONTEXT','USERNAME'),
versions_endtime,
a.

from TESTFLASHBACK versions between timestamp todate( '24-jun-22 15:4200','dd-mon-yy hh24:miss') and sysdate a;

 

This article is my 2nd oldest. It is 126 words long