The Mirror Replication Agent for Oracle must be installed
on a machine where it can directly access mirrored copies of the
Oracle redo log and archive log files.
By default, you can access both online and archive logs. You can configure Mirror Replication Agent to access only the online logs, but doing so requires you to turn auto-archiving off and requires Mirror Replication Agent to issue manual archive log commands to Oracle.
When you are using the default, for archive log files to be accessed, configure Mirror Replication Agent to use a directory path where archive log files are located. 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. However, Mirror Replication Agent requires mirrored archived redo log files to reside in a single directory. Consequently, you must configure Oracle to archive to a single directory to be read by Mirror Replication Agent.
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.
This section discusses how to access Oracle archived
redo logs that are stored as file-system files. If the archived
redo logs are stored using Oracle ASM, see “Automatic Storage Management”.
Mirror Replication Agent for Oracle requires the following settings in your Oracle database:
Redo log archiving must be enabled:
alter database ARCHIVELOG;
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 the following SQL 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.
Because archive log files are always files, rather than raw devices, ensure the disk replication system and file system at the remote site allows the archive logs to be accessed from the remote site. If the disk replication system or remote file system does not provide a means to access archived log files from the primary site, the archive log files must be provided to the remote site outside of disk replication.For example, if the file system on the remote site does not recognize files that have been replicated using disk replication, you can write a copy of the archive log files directly from the primary to a remote system device using a remote mount. Make a remote site device mountable to the primary system and mount that device at the primary site. Then configure Oracle to write an additional copy of the archive log files to this remote device. See the Oracle ALTER SYSTEM command and LOG_ARCHIVE_DEST_n parameter for details on adding additional archive log destinations to your Oracle environment.
In the Mirror Replication Agent, set the pdb_archive_path configuration property to the remote device location. You can also set the Mirror Replication Agent pdb_remove_archives configuration parameter to true to allow the Mirror Replication Agent to remove these archive log files when they are no longer needed to support replication.
When pdb_include_archives is set to true (the default), Mirror Replication Agent does not archive, and Sybase recommends that you configure Oracle to perform automatic archiving of redo logs.
When the pdb_include_archives configuration parameter is set to false, Mirror Replication Agent for Oracle also requires you to disable automatic archiving of Oracle redo logs. Archiving is performed manually by Mirror Replication Agent as the data in the mirrored redo log files is replicated.
Mirror Replication Agent for Oracle requires the following settings in your Oracle database depending on the Oracle version.
Make sure you have sysdba administrator privileges, and close the database.
Enter the following:
alter database ARCHIVELOG MANUAL;
Verify that log archiving is disabled:
select log_mode from v$database;
If MANUAL is returned, then automatic log archiving is disabled.
To change the log_archive_start parameter, either manually edit the server start-up parameter file, or use the following Oracle command:
alter system set log_archive_start=false scope=spfile;
Check the setting of the log_archive_start parameter:
select value from v$system_parameter where name = 'log_archive_start';
If false is returned, the value in the server parameter file has been correctly modified to prevent automatic archiving when you restart the Oracle server. For information about the log_archive_start parameter or the alter system command, see the Oracle Database Reference Manual.
Automatic archiving must be disabled in the active server and when you restart the Oracle server. To stop automatic archiving in the active server, enter the following:
alter system archive log stop;
To disable automatic archiving when you restart the Oracle server, change the value of the server’s log_archive_start parameter to false.
If pdb_include _archives is
set to false: For redo log file processing after Mirror
Replication Agent for Oracle is initialized, automatic archiving
must never be enabled, even temporarily. If automatic archiving is enabled
or if manual archiving is performed, causing a redo log file not yet
processed by Mirror Replication Agent to be overwritten, the data
in the lost redo log file is not replicated. You can recover from
this situation by reconfiguring Mirror Replication Agent to access
archive log files. Set pdb_include_archives to true,
set pdb_archive_path to the
directory location that contains the archive of the file that has
been overwritten, and resume. After catching up, suspend Mirror
Replication Agent, and reset pdb_include_archives to false.
You can enable the forced logging of all database changes to the Oracle redo log file. Sybase recommends setting this option to insure that all data that should be replicated is logged. To enable the force logging command, execute the following statement on the primary database:
alter database FORCE LOGGING;
To verify the current setting of the force logging command, execute the following statement on the primary database:
select force_logging from v$database;