加入收藏 | 设为首页 | 会员中心 | 我要投稿 核心网 (https://www.hxwgxz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程 > 正文

详解Oracle数据库Redo log的六种状态

发布时间:2019-05-07 05:22:37 所属栏目:编程 来源:波波说运维
导读:概述 Oracle 的Online redo log 是为确保已经提交的事务不会丢失而建立的一个机制。 因为这种健全的机制,才能让我们在数据库crash时,恢复数据,保证数据不丢失。下面介绍一下Redo log的六种状态(锻炼下大家英文能力)。 redo log六种状态 1、CURRENT The

详解Oracle数据库Redo log的六种状态

概述

Oracle 的Online redo log 是为确保已经提交的事务不会丢失而建立的一个机制。 因为这种健全的机制,才能让我们在数据库crash时,恢复数据,保证数据不丢失。下面介绍一下Redo log的六种状态(锻炼下大家英文能力)。

redo log六种状态

1、CURRENT

The online redo log is active, that is, needed for instance recovery, and it is the log to which the database is currently writing. The redo log can be open orclosed.

2、ACTIVE

The online redo log is active and required for instance recovery, but is not the log to which the database is currently writing. It may be in use for blockrecovery, and may or may not be archived.Once perform "alter system checkpoint",the log will be change inactive.

3、INACTIVE

The log is no longer needed for instance recovery. It may be in use for media recovery,and may or may not be archived.

4、UNUSED

The online redo log has never been written to.

5、CLEARING

The log is being re-created as an empty log after an ALTER DATABASECLEAR LOGFILE statement. After the log is cleared, then the status changes to UNUSED.

6、CLEARING_CURRENT

Current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch such as an I/O error writing thenew log header. . .

The ALTER DATABASE CLEAR LOGFILE statement can fail with an I/O error due to media failure when it is not possible to:

Relocate the redo log file onto alternative media by re-creating it under the currently configured redo log filename

Reuse the currently configured log filename to re-create the redo log file because the name itself is invalid or unusable (for example, due to media failure)

查看Redo log的状态和具体文件

redo log一般用的比较多命令就上面两条和对redo log调整方面的命令了,属于必须掌握的内容。

【编辑推荐】

  1. 开发分布式SQL数据库的6种技术挑战
  2. 实时数据库:一夜之间,我感受到了时序数据库的威胁
  3. 数据库中存储过程和触发器有什么区别
  4. 5月数据库排行:PostgreSQL 增长放缓,Redis 下跌
  5. 有数据的地方必有库,详解关系型数据库的发展历史
【责任编辑:武晓燕 TEL:(010)68476606】
点赞 0

(编辑:核心网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读