Create the Standby Redo Log Files

The following steps outline the procedure for adding standby redo log files to the downstream mining database. The following summarizes the rules for creating the standby redo logs:

  • Each standby redo log file must be at least as large as the largest redo log file of the redo source database. For administrative ease, Oracle recommends that all redo log files at source database and the standby redo log files at the downstream mining database be of the same size.

  • The standby redo log must have at least one more redo log group than the redo log at the source database, for each redo thread at the source database.

The specific steps and SQL statements that are required to add standby redo log files depend on your environment. See Oracle Data Guard Concepts and Administration Guide for detailed instructions about adding standby redo log files to a database.

Note:

If there are multiple source databases sending redo to a single downstream mining database, only one of those sources can send redo to the standby redo logs of the mining database. An Extract process that mines the redo from this source database can run in real-time mode. All other source databases must send only their archived logs to the downstream mining database, and the Extracts that read this data must be configured to run in archived-log-only mode.

To create the standby redo log files:

  1. In SQL*Plus, connect to the source database as an administrative user.

  2. Determine the size of the source log file. Make note of the results.

    SELECT BYTES FROM V$LOG;
  3. Determine the number of online log file groups that are configured on the source database. Make note of the results.

     SELECT COUNT(GROUP#) FROM V$LOG;
  4. Connect to the downstream mining database as an administrative user.

  5. Add the standby log file groups to the mining database. The standby log file size must be at least the size of the source log file size. The number of standby log file groups must be at least one more than the number of source online log file groups. This applies to each instance (thread) in a RAC installation. So if you have "n" threads at the source database, each having "m" redo log groups, you should configure n*(m+1) redo log groups at the downstream mining database.

    The following example shows three standby log groups.

    ALTER DATABASE ADD STANDBY LOGFILE GROUP 3 
    ('/oracle/dbs/slog3a.rdo', '/oracle/dbs/slog3b.rdo') 
    SIZE 500M; ALTER DATABASE ADD STANDBY LOGFILE 
    GROUP 4 ('/oracle/dbs/slog4.rdo', '/oracle/dbs/slog4b.rdo') 
    SIZE 500M; ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 ('/oracle/dbs/slog5.rdo', '/oracle/dbs/slog5b.rdo') SIZE 500M;
  6. Confirm that the standby log file groups were added successfully.

    SELECT GROUP#, THREAD#, SEQUENCE#, ARCHIVED, STATUS FROM V$STANDBY_LOG;

    The output should be similar to the following:

    GROUP# THREAD# SEQUENCE# ARC STATUS ---------- ---------- ---------- --- ---------- 3 0 0 
    YES UNASSIGNED 4 0 0 YES UNASSIGNED 5 0 0 YES UNASSIGNED
  7. Ensure that log files from the source database are appearing in the location that is specified in the

    LOCATION
    attribute of the local
    LOG_ARCHIVE_DEST_n
    that you set. You might need to switch the log file at the source database to see files in the directory.