Oracle 12c (12.1.0.1) has below enhancements in FDA
- Data Hardening
- User context tracking
You can create new application using REGISTER_APPLICATION
SQL> Begin
DBMS_FLASHBACK_ARCHIVE.register_application(
application_name => 'ORACLERACEXPERT',
flashback_archive_name => 'FDA1');
end;
/
You can add tables to the application using ADD_TABLE_TO_APPLICATION procedure
SQL> Begin
DBMS_FLASHBACK_ARCHIVE.ADD_TABLE_TO_APPLICATION (
application_name=> 'ORACLERACEXPERT',
table_name=> 'EMP' ,
schema_name -> 'USER1');
end;
/
SQL> Begin
DBMS_FLASHBACK_ARCHIVE.ADD_TABLE_TO_APPLICATION (
end;
/
SQL> Begin
DBMS_FLASHBACK_ARCHIVE.ADD_TABLE_TO_APPLICATION (
application_name=> 'ORACLERACEXPERT',
table_name=> 'DEPT' ,
schema_name -> 'USER1');
end;
/
You can remove the tables using REMOVE_TABLE_FROM_APPLICATION procedure from
end;
/
You can remove the tables using REMOVE_TABLE_FROM_APPLICATION procedure from
The application will not enable automatically, use ENABLE_APPLICATION procedure to enable Flashback Data Archive for all tables in the specified application.
SQL> Begin
DBMS_FLASHBACK_ARCHIVE.enable_application(
SQL> Begin
DBMS_FLASHBACK_ARCHIVE.enable_application(
application_name => 'ORACLERACEXPERT');
end;
/
OWNER TABLE_NAME
-------------- -------------------------
SYS SYS_FBA_FA
SYS SYS_FBA_TSFA
SYS SYS_FBA_TRACKEDTABLES
SYS SYS_FBA_PARTITIONS
SYS SYS_FBA_USERS
SYS SYS_FBA_BARRIERSCN
SYS SYS_FBA_DL
SYS SYS_FBA_CONTEXT
SYS SYS_FBA_CONTEXT_AUD
SYS SYS_FBA_CONTEXT_LIST
SYS SYS_FBA_APP
SYS SYS_FBA_APP_TABLES
SYS SYS_FBA_COLS
SYS SYS_FBA_PERIOD
SYS SYS_MFBA_STAGE_RID
SYS SYS_MFBA_TRACKED_TXN
SYS SYS_MFBA_NROW
SYS SYS_MFBA_NCHANGE
SYS SYS_MFBA_NTCRV
You can refer below Oracle Doc for best practices
FDA - Flashback Data Archive Usage and Best Practices (Doc ID 2370465.1)
Flashback Data Archive provides many benefits for maintaining historic data against tracked tables. The FDA helps to perform undo-based flashback operations for an extended period and take advantage of this feature.
end;
/
To disable the application use disable_application procedure
SQL> Begin
DBMS_FLASHBACK_ARCHIVE.disable_application(
application_name => 'ORACLERACEXPERT');
end;
/
User context tracking - By enabling this feature it is easy to track which user made what changes to the table.
Use DMBS_FLASHBACK_ARCHIVE.SET_CONTEXT_LEVEL procedure to Set the user content level and procedure DMBS_FLASHBACK_ARCHIVE.GET_SYS_CONTEXT procedure To Access the context
There are 3 options depending upon how much user context needs to save
ALL – The entire SYS_CONTEXT is stored
TYPICAL – The user context is stored
NONE- Nothing
For ex: - To set context level to ALL
SQL> DBMS_FLASHBACK_ARCHIVE.SET_CONTEXT_LEVEL ( level=>‘ALL’);
You can get the XID from the archive table
SQL> Begin
DBMS_FLASHBACK_ARCHIVE.disable_application(
application_name => 'ORACLERACEXPERT');
end;
/
User context tracking - By enabling this feature it is easy to track which user made what changes to the table.
Use DMBS_FLASHBACK_ARCHIVE.SET_CONTEXT_LEVEL procedure to Set the user content level and procedure DMBS_FLASHBACK_ARCHIVE.GET_SYS_CONTEXT procedure To Access the context
There are 3 options depending upon how much user context needs to save
ALL – The entire SYS_CONTEXT is stored
TYPICAL – The user context is stored
NONE- Nothing
For ex: - To set context level to ALL
SQL> DBMS_FLASHBACK_ARCHIVE.SET_CONTEXT_LEVEL ( level=>‘ALL’);
You can get the XID from the archive table
SQL> select XID from SYS_FBA_HIST_93222;
XID
----------------
05000A0B7040000
Now with XID you can get the context information using dbms_flashback_archive.get_sys_context procedure
SQL> begin
dbms_output.put_line(dbms_flashback_archive.get_sys_context ('05000A0B7040000', 'USERENV', 'SESSION_USER'));
dbms_output.put_line(dbms_flashback_archive.get_sys_context ('05000A0B7040000', 'USERENV', 'HOST'));
dbms_output.put_line(dbms_flashback_archive.get_sys_context ('05000A0B7040000', 'USERENV', 'MODULE'));
end;
/
USER1
SRVHOST
SQL*Plus
You can get all Transactions ID using below query
SQL> select empno, empname, VERSIONS_XID
from EMP order by empno;
EMPNO EMPNAME VERSIONS_XID
----------- --------------- ---------------------
1 ORARAC 05000A0B7040000
You can use SYS_FBA_CONTEXT_AUD to get context information for each transaction.
There are many Flashback data archive view available and to get the list of all views run below query
XID
----------------
05000A0B7040000
Now with XID you can get the context information using dbms_flashback_archive.get_sys_context procedure
SQL> begin
dbms_output.put_line(dbms_flashback_archive.get_sys_context ('05000A0B7040000', 'USERENV', 'SESSION_USER'));
dbms_output.put_line(dbms_flashback_archive.get_sys_context ('05000A0B7040000', 'USERENV', 'HOST'));
dbms_output.put_line(dbms_flashback_archive.get_sys_context ('05000A0B7040000', 'USERENV', 'MODULE'));
end;
/
USER1
SRVHOST
SQL*Plus
You can get all Transactions ID using below query
SQL> select empno, empname, VERSIONS_XID
from EMP order by empno;
EMPNO EMPNAME VERSIONS_XID
----------- --------------- ---------------------
1 ORARAC 05000A0B7040000
You can use SYS_FBA_CONTEXT_AUD to get context information for each transaction.
There are many Flashback data archive view available and to get the list of all views run below query
SQL> SET PAGESIZE 1000
SQL> SET LINESIZE 600
SQL> COLUMN owner FORMAT A10
SQL> COLUMN table_name FORMAT A25
SQL> SELECT owner, table_name FROM dba_tables WHERE table_name LIKE '%FBA%';
SQL> SET LINESIZE 600
SQL> COLUMN owner FORMAT A10
SQL> COLUMN table_name FORMAT A25
SQL> SELECT owner, table_name FROM dba_tables WHERE table_name LIKE '%FBA%';
OWNER TABLE_NAME
-------------- -------------------------
SYS SYS_FBA_FA
SYS SYS_FBA_TSFA
SYS SYS_FBA_TRACKEDTABLES
SYS SYS_FBA_PARTITIONS
SYS SYS_FBA_USERS
SYS SYS_FBA_BARRIERSCN
SYS SYS_FBA_DL
SYS SYS_FBA_CONTEXT
SYS SYS_FBA_CONTEXT_AUD
SYS SYS_FBA_CONTEXT_LIST
SYS SYS_FBA_APP
SYS SYS_FBA_APP_TABLES
SYS SYS_FBA_COLS
SYS SYS_FBA_PERIOD
SYS SYS_MFBA_STAGE_RID
SYS SYS_MFBA_TRACKED_TXN
SYS SYS_MFBA_NROW
SYS SYS_MFBA_NCHANGE
SYS SYS_MFBA_NTCRV
You can refer below Oracle Doc for best practices
FDA - Flashback Data Archive Usage and Best Practices (Doc ID 2370465.1)
Flashback Data Archive provides many benefits for maintaining historic data against tracked tables. The FDA helps to perform undo-based flashback operations for an extended period and take advantage of this feature.
Use DMBS_FLASHBACK_ARCHIVE.SET_CONTEXT_LEVEL procedure to Set the user content level and procedure DMBS_FLASHBACK_ARCHIVE.GET_SYS_CONTEXT procedure To Access the context
ReplyDeleteThis blog post on flashback data archive enhancements in Oracle is informative and insightful. The article provides valuable insights into the advancements in Oracle's flashback data archive feature. These enhancements greatly contribute to improving data management and ensuring data integrity. As a student seeking dissertation help uk, I find this information helpful in understanding the latest developments in database technologies. Thank you for sharing this valuable knowledge!
ReplyDeleteThe recent enhancements to Oracle's Flashback Data Archive are a game-changer for businesses, much like the transformative impact on car sellers in Dubai. With improved performance and usability, businesses can now efficiently manage historical data, gaining valuable insights and making informed decisions. Just as selling a car in Dubai requires staying ahead of the market, these enhancements enable organizations to track and retrieve data versions effortlessly, streamlining their operations and driving growth. Embracing these advancements, Oracle users can unlock the power of data and elevate their strategies to new heights.
ReplyDelete"Flashback Data Archive enhancements in Oracle" provides valuable insights into the latest developments in database technology. Speaking of advancements, explore 'Hube Limited Pakistan' for cutting-edge home automation WiFi switch solutions. Just as Oracle evolves its data capabilities, our website offers state-of-the-art devices that let you control your home with a simple tap. Experience the future of smart living at 'Hube Limited Pakistan' and elevate your home's efficiency and connectivity to new heights.
ReplyDeleteA reliable power bank for your mobile phone is an absolute must-have in today's fast-paced world. Whether you're on a long journey, attending back-to-back meetings, or exploring the great outdoors, having a power bank ensures your device stays charged, keeping you connected when you need it most. Look for features like high capacity and fast charging to ensure your mobile stays powered up throughout the day.
ReplyDeletepk89 slot เว็บไซต์ สล็อต ฝาก-ถอน pg slot ไม่ต้องเดินทางไปไกล ถึงมาเก๊าก็สามารถทดสอบเล่นสล็อตหรือบริการอื่นๆจากทางเว็บไซต์ของพวกเราได้เลย ทำให้สะดวกมากขึ้นไปอีกบริการอื่นๆ
ReplyDeleteHi, I'm Shaikh Omer, a pizza enthusiast on a quest to uncover the finest Quick delivery pizza. Recently, I stumbled upon the delectable offerings at NY 212 Pizza, and I can't wait to share my firsthand experience with you.
ReplyDeleteAdd some sparkle and shine to your game day wardrobe with the San Francisco 49ers Red Sequins Jacket. SF 49ers Red Sequin Jacket Its full-zip design and red sequin detailing make for a bold and fashionable way to show off your team pride. Stay warm and stylish while representing your favorite team with this eye-catching jacket.
ReplyDeleteThe enhancements to Flashback Data Archive in Oracle 12c significantly improve data management and recovery capabilities. With these updates, users benefit from more efficient space management, support for new data types, and extended retention periods. These features enhance the reliability and flexibility of long-term data storage. Overall, Oracle 12c's Flashback Data Archive improvements offer robust solutions for businesses needing advanced data preservation and recovery options.
ReplyDeletetraffic lawyer prince george va