Enable an Appropriate Logging Mode
As part of preparing the primary database for standby database creation, you must enable a logging mode appropriate to the way you plan to use the Oracle Data Guard configuration.
The default logging mode of a database that is not part of an Oracle Data Guard configuration allows certain data loading operations to be performed in a nonlogged manner. This default mode is not appropriate to a database with a standby, because it leads to the loaded data being missing from the standby, which requires manual intervention to fix.
In addition to the default logging mode, there are three other modes that are appropriate for a primary database:
-
FORCE LOGGING
mode prevents any load operation from being performed in a nonlogged manner. This mode can slow down the load process, because the loaded data must be copied into the redo logs.FORCE LOGGING
mode is enabled using the following command:SQL> ALTER DATABASE FORCE LOGGING;
-
STANDBY NOLOGGING FOR DATA AVAILABILITY
mode causes the load operation to send the loaded data to each standby through its own connection to the standby. The commit is delayed until all the standbys have applied the data as part of running managed recovery in an Active Data Guard environment. It is enabled with the following command:SQL> ALTER DATABASE SET STANDBY NOLOGGING FOR DATA AVAILABILITY;
-
STANDBY NOLOGGING FOR LOAD PERFORMANCE
is similar to the previous mode except that the loading process can stop sending the data to the standbys if the network cannot keep up with the speed at which data is being loaded to the primary. In this mode it is possible that the standbys may have missing data, but each standby automatically fetches the data from the primary as a normal part of running managed recovery in an Active Data Guard environment. It is enabled with the following command:SQL> ALTER DATABASE SET STANDBY NOLOGGING FOR LOAD PERFORMANCE;
When you issue any of these statements, the primary database must at least be mounted (and it can also be open). The statement can take a considerable amount of time to complete, because it waits for all unlogged direct write I/O to finish.
Note:
When you enable STANDBY NOLOGGING FOR DATA AVAILABILITY
or STANDBY NOLOGGING FOR LOAD PERFORMANCE
on the primary database,
any standbys that are using multi-instance redo apply functionality will stop
applying redo with the error ORA-10892
. You must first restart redo
apply and allow the affected standbys to progress past the NOLOGGING operation
period and then enable multi-instance redo apply.
- Oracle Database Appliance
- Exadata
- Exadata Cloud Service
- Database Cloud Service Enterprise Edition - Extreme Performance
Related Topics
See Also:
Oracle Database Administrator’s GuideFor more information about the ramifications of specifyingFORCE LOGGING
mode
Parent topic: Upgrading Databases with Oracle Data Guard Standbys