Time for action – fixing NOLOGGING changes on a standby database with incremental datafile backups
As a prerequisite for this exercise, first put the primary database in the no-force logging mode using the ALTER DATABASE NO FORCE LOGGING
statement. Then perform some DML operations in the primary database using the NOLOGGING
clause so that we can fix the issue in the standby database with the following steps:
Run the following query to identify the datafiles that are affected by
NOLOGGING
changes:SQL> SELECT FILE#, FIRST_NONLOGGED_SCN FROM V$DATAFILE WHERE FIRST_NONLOGGED_SCN > 0; FILE# FIRST_NONLOGGED_SCN ---------- ------------------- 4 20606544
First we need to put the affected datafiles in the
OFFLINE
state in the standby database. For this purpose, stop Redo Apply in the standby database, execute theALTER DATABASE DATAFILE ... OFFLINE
statement, and start Redo Apply again:SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; SQL> ALTER DATABASE...