User Tools

Site Tools


flashbackdataarchive

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
flashbackdataarchive [2015/10/28 11:47] – created z0hpvkflashbackdataarchive [2025/03/08 22:24] (current) – external edit 127.0.0.1
Line 4: Line 4:
 The user context can now be tracked with FDA and therefore see which user made changes to a table.\\ The user context can now be tracked with FDA and therefore see which user made changes to a table.\\
 Use DBMS_FLASHBACK_ARCHIVE.SET_CONTEXT_LEVEL procedure to do this ... Use DBMS_FLASHBACK_ARCHIVE.SET_CONTEXT_LEVEL procedure to do this ...
-  * ALL : All contexts from the SYS_CONTEXT function are stored. +<code>ALL     : All contexts from the SYS_CONTEXT function are stored. 
-  TYPICAL : Only basic auditing attributes from the USERENV context are stored. +TYPICAL : Only basic auditing attributes from the USERENV context are stored. 
-  NONE : No context information is stored.+NONE    : No context information is stored. 
 + 
 +EXEC DBMS_FLASHBACK_ARCHIVE.SET_CONTEXT_LEVEL('TYPICAL');</code> 
 + 
 +Use DBMS_FLASHBACK_ARCHIVE.GET_SYS_CONTEXT function to retrieve the data ... 
 +<code>SELECT DBMS_FLASHBACK_ARCHIVE.GET_SYS_CONTEXT(versions_xid, 'USERENV','SESSION_USER'
 +FROM   FDA_TABLE 
 +       VERSIONS BETWEEN TIMESTAMP SYSTIMESTAMP - 1 AND SYSTIMESTAMP;</code>
  
  
  
 ==== Database Hardening ==== ==== Database Hardening ====
 +You can now group a set of tables in a Flashback Archive.
 +These tables are known as Applications.
 +
 +Create Application ...
 +<code>BEGIN
 +  DBMS_FLASHBACK_ARCHIVE.REGISTER_APPLICATION (
 +    application_name       => 'DUBETECH_APP',
 +    flashback_archive_name => 'DUBETECH_FDA');
 +END;</code>
 +
 +Add Tables to Application ...
 +<code>BEGIN
 +  DBMS_FLASHBACK_ARCHIVE.ADD_TABLE_TO_APPLICATION (
 +    application_name => 'DUBETECH_APP',
 +    table_name       => 'CUSTOMERS',
 +    schema_name      => 'DUBETECH');
 +END;</code>
 +
 +Use ENABLE_APPLICATION to enable all tables in application for FDA.
 +<code>BEGIN
 +  DBMS_FLASHBACK_ARCHIVE.ENABLE_APPLICATION (application_name => 'DUBETECH_APP');
 +END;</code>
 +
  
 ==== Import/Export Table History ==== ==== Import/Export Table History ====
 +The history of tables in a FDA can now be imported or exported.
  
flashbackdataarchive.1446032859.txt.gz · Last modified: 2025/03/08 22:23 (external edit)