设为首页 加入收藏

TOP

【恢复,1】redo日志恢复的各种情况(二)
2014-11-24 08:11:38 来源: 作者: 【 】 浏览:13
Tags:恢复 redo 日志 各种 情况
所有成员后恢复

If a media failure damages all members of an online redo log group, then different scenarios can occur depending on the type of online redo log group affected by the failure and the archiving mode of the database.

如果介质故障损坏所有的日志组的成员,不同场景下发生的失败影响依赖于日志组类型和数据库的归档模式。

If the damaged online redo log group is current and active, then it is needed for crash recovery; otherwise, it is not. Table 30-4 outlines the various recovery scenarios.

如果损坏的当前日志组时current和active,那么需要做故障恢复。

Table 30-4 Recovering After the Loss of an Online Redo Log Group

If the Group Is... Then... And You Should...

Inactive

It is not needed for crash recovery

Clear the archived or unarchived group.

Active

It is needed for crash recovery

Attempt to issue a checkpoint and clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.

试着执行checkpoint和clear日志,如果不能,那么你必须要么使用闪回数据库要么使用转储备份 执行不完全恢复到最近可用的redo log。

Current

It is the redo log that the database is currently writing to

Attempt to clear the log; if impossible, then you must either use Flashback Database or restore a backup and perform incomplete recovery up to the most recent available redo log.


To determine whether the damaged group is active or inactive.

确定损坏的组是否是acitve 或inactive

    Locate the file name of the lost redo log in V$LOGFILE and then look for the group number corresponding to it. For example, enter:

    SELECT GROUP#, STATUS, MEMBER FROM V$LOGFILE;
    
    GROUP#    STATUS       MEMBER
    -------   -----------  ---------------------
    0001                    /oracle/dbs/log1a.f
    0001                    /oracle/dbs/log1b.f
    0002      INVALID       /oracle/dbs/log2a.f
    0002      INVALID       /oracle/dbs/log2b.f
    0003                    /oracle/dbs/log3a.f
    0003                    /oracle/dbs/log3b.f
    

    Determine which groups are active.

    For example, execute the following SQL query (sample output included):

    SELECT GROUP#, MEMBERS, STATUS, ARCHIVED 
    FROM V$LOG;
    
    GROUP#  MEMBERS           STATUS     ARCHIVED
    ------  -------           ---------  -----------
     0001   2                 INACTIVE   YES
     0002   2                 ACTIVE     NO
     0003   2                 CURRENT    NO
    

    Perform one of the following actions:

    If the affected group is inactive, then follow the procedure in "Losing an Inactive Online Redo Log Group".

    If the affected group is active (as in the preceding example), then follow the procedure in "Losing an Active Online Redo Log Group".



    Losing an Inactive Online Redo Log Group

    丢失inactive 日志组

    If all members of an online redo log group with INACTIVE status are damaged, then the procedure depends on whether you can fix the media problem that damaged the inactive redo log group. If the failure is temporary, then fix the problem. The log writer can reuse the redo log group when required. If the failure is permanent, then the damaged inactive online redo log group eventually halts normal database operation. Reinitialize the damaged group manually by issuing the ALTER DATABASE CLEAR LOGFILE statement as described in this section.

    inactive状态的日志组所有成员损坏。那么程序依赖于你能否定位inactive日志组的介质问题(日志文件是否损坏),如果介质故障是临时的,log writer 能重新使用 日志组。如果介质故障是永久的,那么损坏的inactive日志组最终会停止正常的数据库操作。通过执行alter database CLEAR LOGFILE语句手动的重新初始化损坏的日志组。

    Clearing Inactive, Archived Redo

    清除inactive 已归档的日志

    You can clear an inactive redo log group when the database is open or closed. The procedure depends on whether the damaged group has been archived.

    数据库开启或关闭都能 clear inactive 日志组。依赖于损坏的日志组是否归档。

    To clear an inactive, online redo log group that has been archived:

    If the database is shut down, then s

首页 上一页 1 2 3 4 下一页 尾页 2/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇procedure ems_user 下一篇Oracle数据建模器---data modeler..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·MySQL 基础入门视频 (2025-12-26 23:20:22)
·小白入门:MySQL超详 (2025-12-26 23:20:19)
·关于 MySQL 数据库学 (2025-12-26 23:20:16)
·SOLVED: Ubuntu 24.0 (2025-12-26 22:51:53)
·Linux 常用命令最全 (2025-12-26 22:51:50)