Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, B.

Asked: June 02, 2016 - 2:21 pm UTC

Last updated: July 05, 2022 - 12:25 am UTC

Version: 11.2.0.4 and above

Viewed 10K+ times! This question is

You Asked

Chris & Connor,

We are working on a new project and were wondering as to what options are currently available / provided by Oracle for Change Data Capture, besides the DIY MViews ( MVIEW logs mostly ), triggers etc, does Oracle 11.2.0.4 and above provide an out of the box solution ?

I have heard that Oracle CDC is being deprecated, is there some option available that will track all the data changes made to a table ?

Thanks

BC
MT, MI


and Chris said...

Yes, CDC is desupported as of 12c:

http://docs.oracle.com/database/121/UPGRD/deprecated.htm#UPGRD60014

If you're just looking for something to help you see all the changes to your data, check out Flashback Data Archive. This extends flashback query to enable you look back at a table over time.

To use it simply create an archive, then alter your tables to use it!

create flashback archive <archive> tablespace <tablespace> retention 1 year;

alter table <table> flashback archive <archive>;


To view state of the table at a point in time in the past, use standard flashback (as of) queries. Or you can see all the modifications between two times using "versions between" queries:

select * from tab as of timestamp sysdate - 7;

select * from tab versions between timestamp sysdate - 7 and sysdate;


This was part of a separately licensed option. But as of 11.2.0.4 it's now part of the database license!

For further reading, see:

https://oracle-base.com/articles/12c/flashback-data-archive-fda-enhancements-12cr1

If you're looking for something to help you transfer the changes to other databases, GoldenGate is our preferred solution.

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Thank you

BC, June 02, 2016 - 3:57 pm UTC

Thank you so much for the detailed explanation about the options and license.

I had thought about Flashback Data Archive and created a ticket with Oracle Support to determine if it is an option in our current license.

You guys are the best, thank you

BC
MT, MI

Is Flashback Data Archive completely transparent?

Matthew McPeak, June 02, 2016 - 9:25 pm UTC

Is Flashback Data Archive as transparent as CDC was?

For example, we used CDC to monitor tables that are owned by a 3rd party application (and have not broken that application by doing so, so far).

But, if we move those tables into a FDA, isn't that more invasive / less transparent to the application? E.g., might we not break their patching process with ORA-55610 errors due to limited DDL support for tables in FDAs?

Personally, I find Oracle's desupport of CDC outrageous. It's like them saying "we have a better product for indexing so we're going to deprecate the CREATE INDEX command and charge you for the new, improved way".


Chris Saxon
June 03, 2016 - 4:01 am UTC

Is Flashback Data Archive as transparent as CDC was?

Possibly not as much as so, although that's dependent on the version of the database. Conversely, I see you've omitted the large number of restrictions placed upon you if you opt for the CDC route :-)


Options for Autonomous Database

John, July 03, 2022 - 4:52 pm UTC

While Flashback Data Archive is a perfect option for this kind of functionality, it is sadly not available for Autonomous Database. Are there any alternative options for this type of database?
Connor McDonald
July 05, 2022 - 12:25 am UTC

FDA is *coming* for autonomous, but is not there yet (as I write this).

In the interim, perhaps a trigger based solution but one that still allows automation of the process

https://github.com/connormcd/audit_utility

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library