我是靠谱客的博主 等待黑猫,这篇文章主要介绍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的全部内容,更多相关ALTER内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(124)

评论列表共有 0 条评论

立即
投稿
返回
顶部