概述
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的全部内容,希望文章能够帮你解决ALTER DATABASE [NO] FORCE LOGGING所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复