Does Oracle have something like Change Data Capture in SQL Server 2008?
oracle, sql-server
Solution
Sure. Oracle actually has a number of technologies for this sort of thing depending on the business requirements.
- Oracle has had something called Workspace Manager for a long time (8i days) that allows you to version-enable a table and track changes over time. This can be a bit heavyweight, though, because it is based on views with instead-of triggers.
- Starting in 11.1 (as an extra cost option to the enterprise edition), Oracle has a Total Recall that asynchronously mines the redo logs for data changes that get logged to a separate table which can then be queried using flashback query syntax on the main table. Total Recall is automatically going to partition and compress the historical data and automatically takes care of purging the data after a specified data retention period.
- Oracle has a LogMiner technology that mines the redo logs and presents transactions to consumers. There are a number of technologies that are then built on top of LogMiner including Change Data Capture and Streams.
- You can also use materialized views and materialized view logs if the goal is to replicate changes.
Problem
Change Data Capture is a new feature in SQL Server 2008. From MSDN: Change data capture provides historical change information for a user table by capturing both the fact that DML changes were made and the actual data that was changed. Changes are captured by using an asynchronous process that reads the transaction log and has a low impact on the system This is highly sweet - no more adding CreatedDate and LastModifiedBy columns manually. Does Oracle have anything like this?