Forcing Oracle to use LOGGING mode
Published Wednesday, August 10, 2005 by Radoslav Rusinov | E-mail this post
I've just read an interesting newsletter about that how we can force the database (or some tablespace) to use the LOGGING mode for all operations. For example, lets imagine that we don't want someone improperly to start some operation in NOLOGGING mode that will lead the database to impossibility of performing of full database recovery after media failure. This could be important issue if a Standby database is used as well.
The FORCE LOGGING clause was introduced in Oracle9i R2. It tells to Oracle redo logs to be written even when the NOLOGGING was specified in a DDL staement, table in NOLOGGING mode was created, or SQL*Loader was used to fill table via direct path loading.
This command can be applied at the database or tablespace level:
ALTER DATABASE FORCE LOGGING;
ALTER TABLESPACE tbs_name FORCE LOGGING;
The following query shows the recovery time of the last used NOLOGGING operation for all datafiles:
SELECT name,unrecoverable_change#,unrecoverable_time FROM v$datafile;Keep in mind that Oracle never generates redo records for temporary tablespaces and temporary segments, so forced logging has no affect for these.
For more details about this feature:
Oracle9i Documentation - Specifying FORCE LOGGING ModeMetalink note:174951.1 - Force LoggingAnother very interesting Metalink note about the problems coming from using of NOLOGGING operations especially when Standby database exists:
Metalink note:290161.1 - The Gains and Pains of Nologging Operations
0 Responses to “Forcing Oracle to use LOGGING mode”
Leave a Reply