Redo and Archive Log Setup

By default, you can access both online and archive logs. You can configure Replication Agent to access only the online logs, but doing so requires you to turn Oracle automatic archiving off and requires Replication Agent to issue manual archive log commands to Oracle.

Note: If Replication Agent for Oracle is configured to truncate Oracle archive logs directly—rman_enabled is set to false and pdb_archive_remove is set to true—it must be installed on a host that has direct access to the Oracle archive log files.

When you add or delete the Oracle archive logs without updating their statuses in v$archived_log view, the Replication Agent for Oracle Log Reader cannot control log files that are being loaded.

Therefore, once you remove or add Oracle archive logs, you must execute RMAN crosscheck archivelog all command to make sure the v$archived_log view is up-to-date.

Archive Log Access

When you are using the default, archive log files will be accessed. The Replication Agent for Oracle uses the Oracle LogMiner to capture replicated transactions. The LogMiner automatically loads the log files. By default, an Oracle instance creates multiple directories under the flash recovery area specified by the DB_RECOVERY_FILE_DEST parameter of the Oracle ALTER SYSTEM command, each directory corresponding to and named after a separate day.

When there are multiple archive path, log file are loaded from one of the archive paths being in a prioritized order such as in LOG_ARCHIVE_DEST_n or alphabetically. If a log file is missing from the first prioritized path, LogMiner loads the log file from the next prioritized archive path.
Tip: To be sure that Replication Agent for Oracle does not read the archived redo logs from the incorrect location, set the configuration pdb_archive_path to read the first prioritized path in the Replication Agent.
Note: To prevent conflicts with other archive file processes, you may want to configure Oracle to duplex the archive log files into an additional destination directory that is used only for replication.

For information on specifying archive log destinations for your Oracle environment, see the Oracle ALTER SYSTEM command and LOG_ARCHIVE_DEST_n parameter.

Note: Accessing Oracle archived redo logs that are stored as file-system files is discussed in this section. If the archived redo logs are stored using the Oracle ASM, see the discussion of Automatic Storage Management.
Replication Agent for Oracle requires that redo log archiving is enabled at your Oracle database:
alter database ARCHIVELOG;
Note: If you are using Oracle Real Application Clusters (RAC), you must enable redo log archiving for each instance in the cluster.
Verify that log archiving is enabled:
select log_mode from v$database;
If you are using Oracle RAC, use this SQL statement to verify that log archiving has been enabled:
select instance, name, log_mode from gv$database;

If ARCHIVELOG (ARCHIVELOG or MANUAL in Oracle 10g) is returned, then log archiving is enabled.

Archive Log File Access

In the Replication Agent, set the pdb_archive_path configuration property to the expected location of archived redo log files. You can also set the Replication Agent pdb_archive_remove configuration parameter to true to allow the Replication Agent to remove these archive log files when they are no longer needed to support replication.

The rman_enabled parameter enables Replication Agent to use the Oracle RMAN utility to truncate old archive log files. See the Replication Agent Reference Manual.

Replication Agent Archive Setup

When pdb_include_archives is set to true (the default), Replication Agent does not archive, and SAP recommends that you configure Oracle to perform automatic archiving of redo logs.

When the pdb_include_archives configuration parameter is set to false, Replication Agent for Oracle also requires you to disable automatic archiving of Oracle redo logs. Archiving is performed manually by Replication Agent as the data in the online redo log files is replicated.

Replication Agent for Oracle requires these settings in your Oracle database depending on the Oracle version.

Related concepts
Automatic Storage Management