Work with Oracle database redo log files Stay organized with collections Save and categorize content based on your preferences.
During change data capture, Datastream reads Oracle redo log files tomonitor your source databases for changes and replicate them to the destinationinstance. Each Oracle database has a set of online redo log files. Alltransaction records on the database are recorded in the files. When the currentredo log file is rotated (or switched), the archive processcopies this file into an archive storage. Meanwhile, the database promotesanother file to serve as the current file.
Datastream Oracle connector extracts change data capture (CDC) eventsfromarchived Oracle redo log files.
Access redo log files
Datastream can use the Oracle LogMiner API or the binaryreader method to access the redo log files:
Oracle LogMiner: an out-of-the-box utility included in Oracle databases.If you configure Datastream to use Oracle LogMiner API, Datastreamcan only work witharchived redo log files, online redo log files aren't supported.The LogMiner API method is single-threaded and is subject to higher latency andlower throughput when working with large transaction number source databases.LogMiner supports most data types and Oracle database features.
Binary reader (Preview):a specialized, high-performance utility that works with both online and archivedredo log files. Binary reader can access the log files using Automatic StorageManagement (ASM) or by reading the files directly using database directory objects.Binary reader is multithreaded and supports low-latency CDC. It also creates lowimpact on the source database as redo logs are parsed outside of the databaseoperations. The binary reader CDC method has limited support for certain datatypes or features. For more information, seeKnown limitations.
Set configuration parameters for Oracle redo log files
This design has profound implications on Datastream's potential latency. If Oracle's redo log files are switched frequently or kept to a smaller size (for example, < 256MB), Datastream can replicate changes faster.
There are configuration parameters that you can set to control the log file rotation frequency:
Size: Online redo log files have a minimum size of 4 MB, and the default size is dependent on your operating system. You can modify the size of the log files by creating new online log files and dropping the older log files.
To find the size of the online redo log files, run the following query:
SELECTGROUP#,STATUS,BYTES/1024/1024MBFROMV$LOG
Generating very large log files might cause Datastream to time out, which can lead to stream failure. The recommended redo log file size is below 1GB.
For information about resizing redo logs for a self-hosted Oracle instance, seeHow to resize redo logs in Oracle.
For information about resizing redo logs for an Amazon RDS Oracle instance, seeResizing online redo logs.
Time: The
ARCHIVE_LAG_TARGETparameter provides an upper limit of how long (in seconds) the current log of the primary database can span.This isn't the exact log switch time, because it takes into account how long it will take to archive the log. The default value is
0(no upper bound), and a reasonable value of1800(or 30 minutes) or less is suggested.You can use the following commands to set the
ARCHIVE_LAG_TARGETparameter, either during initialization or while the database is up:SHOW PARAMETER ARCHIVE_LAG_TARGET;This command displays how many seconds it will take for the current log to span.ALTER SYSTEM SET ARCHIVE_LAG_TARGET =number-of-seconds;Use this command to change the upper limit.For example, to set the upper limit to 10 minutes (or 600 seconds), enter
ALTER SYSTEM SET ARCHIVE_LAG_TARGET =600;
You can switch the redo log files manually by running the following command:
ALTER SYSTEM SWITCH LOGFILE;
Although using this command is effective for testing purposes, we don't recommend it for production use-cases because of the privileges it requires and the significant performance impact on the database.
What's next
- Learn more aboutOracle as a source.
- Learn more aboutconfiguring a source Oracle database.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.