Redo and archive log setup

NoteThe Replication Agent for Oracle must be installed on a machine where it can directly access the Oracle redo log and archive log files.

You can access both online and archive logs by default. If you want to access only the online logs, the Replication Agent can be configured to do so, but it requires that you turn auto-archiving off and requires Replication Agent to issue manual archive log commands to Oracle.

Accessing archive logs

When the default is used and archive log files are to be accessed, the Replication Agent must be configured to use the directory path where the archive log files are located. To prevent conflicts with other archive file processes, you may wish to configure Oracle to produce archive log files into an additional directory used only for replication. Replication Agent can be configured to remove archive log files when they are no longer needed. Sybase recommends that you configure the Replication Agent to remove archive log files only if an additional directory is used.

NoteThis section discusses access to Oracle archived redo logs that are stored as file-system files. If the archived redo logs are stored using the Oracle ASM, see “Automatic Storage Management” for details.

Replication Agent for Oracle requires the following settings in your Oracle database:

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

When pdb_include_archives is set to true, the default, the Replication Agent does not do archiving and Sybase recommends that you configure Oracle to do automatic archiving of redo logs.

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

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

For Oracle 10g

StepsTo disable automatic archiving

  1. Make sure you have SYSDBA administrator privileges, and close the database.

  2. Enter the following:

    alter database ARCHIVELOG MANUAL;
    
  3. To verify that log archiving is disabled:

    select log_mode from v$database;
    

    If MANUAL is returned, then automatic log archiving is disabled.

For Oracle 9i

StepsTo disable automatic archiving

  1. To change the LOG_ARCHIVE_START parameter, you can manually edit the server’s start-up parameter file or use the following Oracle command:

    alter system set log_archive_start=false scope=spfile;
    
  2. To check the setting of the LOG_ARCHIVE_START parameter:

    select value from v$system_parameter where name = 'log_archive_start';
    
  3. If false is returned, the value in the server parameter file has been correctly modified to prevent automatic archiving when you re-start the Oracle server. For more information about the LOG_ARCHIVE_START parameter or the ALTER SYSTEM commands, see the Oracle Database Reference Guide.

  4. Automatic archiving must be disabled in the active server and when you re-start the Oracle server. To stop automatic archiving in the active server:

    alter system archive log stop;
    
  5. To disable automatic archiving when you re-start the Oracle server, change the value of the server’s LOG_ARCHIVE_START parameter to false.

    NoteThis note applies only when pdb_include _archives is set to false. For redo log file processing after Replication Agent for Oracle is initialized, automatic archiving must never be enabled, even temporarily. If automatic archiving is re-enabled or manual archiving is performed, causing a redo log file not yet processed by the Replication Agent to be overwritten, then the data in the lost redo log file will not be replicated. You CAN recover from this situation by reconfiguring the 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 the Replication Agent, and reset pdb_include_archives to false.

Forced logging of all database changes

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;