ALTER DATABASE [NO] FORCE LOGGING

ALTER DATABASE [NO] FORCE LOGGING

Use this clause to put the database into or take the database out of FORCE LOGGING mode. The database must be mounted or open.

In FORCE LOGGING mode, Oracle Database logs all changes in the database except changes in temporary tablespaces and temporary segments. This setting takes precedence over and is independent of any NOLOGGING or FORCE LOGGING settings you specify for individual tablespaces and any NOLOGGING settings you specify for individual database objects.

If you specify FORCE LOGGING, then Oracle Database waits for all ongoing unlogged operations to finish.

See Also:

Oracle Database Administrator's Guide for information on when to use FORCE LOGGING mode

 

select log_mode,force_logging from v$database;
select tablespace_name,logging,force_logging from dba_tablespaces;
select table_name,logging from user_tables;
ALTER TABLESPACE users FORCE LOGGING;
ALTER DATABASE FORCE LOGGING;

 

$ sqlplus /nolog

SQL*Plus: Release 9.2.0.7.0 - Production on Sun Sep 1 20:37:48 2019

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> select log_mode,force_logging from v$database;

LOG_MODE     FOR
------------ ---
ARCHIVELOG   NO

SQL> ALTER DATABASE FORCE LOGGING;

Database altered.

SQL> select log_mode,force_logging from v$database;

LOG_MODE     FOR
------------ ---
ARCHIVELOG   YES

SQL>

你可能感兴趣的:(ALTER DATABASE [NO] FORCE LOGGING)