Flashback Data Archive with Switchover
Shobhit Bhate, June 14, 2024 - 5:58 am UTC
Hi Tom,
1)
Does flashback data archive works after switchover and switchback activity in Oracle 19c?
2)
Is there any limit maximum retention period for Flashback Data Archive in Oracle 19c?
3)
Please let us know the scenarios when optimized data should not be tried?
June 18, 2024 - 4:15 am UTC
Flashback Data Archive with Switchover
A reader, June 18, 2024 - 1:39 pm UTC
Thanks Connor for addressing the query. :-)
June 21, 2024 - 10:11 am UTC
You're welcome
Flashback Data Archive Performance
Shobhit Bhate, June 20, 2024 - 4:54 am UTC
Thanks Connor for addressing the query :-)
1) By optimized data I meant - " (Optional) Whether to optimize the storage of data in the history tables maintained in the Flashback Archive, using [NO] OPTIMIZE DATA. The default is NO OPTIMIZE DATA. "
Please let us know the scenario when optimized data option should not be configured?
2) How can we improve the performance of data retrieval from the Flashback archive ? Can we create indexes on the archives or partition the archives?
3) Can we move the data out of the archives using data pump or some other mechanism to retain it for much longer than the retention period specified for the archives and at the same time not impact the performance of the flashback archives?
June 21, 2024 - 10:16 am UTC
1 From the CREATE FLASHBACK ARCHIVE docs:
Specify OPTIMIZE DATA to enable optimization for flashback archive history tables. This instructs the database to optimize the storage of data in history tables using any of the following features: Advanced Row Compression, Advanced LOB Compression, Advanced LOB Deduplication, segment-level compression tiering, and row-level compression tiering. To specify this clause, you must have a license for the Advanced Compression option.
(emphasis mine)
2. The database partitions in the history tables automatically.
3. You can't export the data like regular tables. 21c added the package DBMS_FLASHBACK_ARCHIVE_MIGRATE to help you export/import this data. You can also run your own queries get the historic data and save it to another location.
Flashback Data Archive Roles and Privileges
Shobhit Bhate, June 21, 2024 - 4:05 am UTC
Hi Connor / Chris
4) Adding one more question to the list.
Following the security model , generally the schema containing the objects is not used for logon activity, separate users are created for connecting to the database. Please let us know the grants /roles /privileges a user should have to access the flashback data archive of a different schema.
For example, EMP table resides in SCOTT schema and flashback data archive FLA1 is configured for the EMP table.
User named TIGER is created for connecting to the database.
Question :- Please let us know the grants /roles /privileges TIGER user should have to access audit data from flashback data archive FLA1 for EMP table that is to run the following query -
conn Tiger/xxx
select empno, ename, job, sal, comm,
nvl(VERSIONS_STARTTIME,LAST_MOD) TS
,nvl(VERSIONS_OPERATION,'I') op
from EMP
versions between timestamp
TIMESTAMP (SYSTIMESTAMP - 10) AND SYSTIMESTAMP
order by empno;
June 21, 2024 - 10:28 am UTC
Other users need query (SELECT/READ) and FLASHBACK privileges.
Shobhit Bhate, June 24, 2024 - 2:21 pm UTC
Thanks a lot Chris for addressing the queries.
June 25, 2024 - 4:23 am UTC
glad we could help