`
WSZ1102.shu
  • 浏览: 16094 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Oracle v$logfile status stale

阅读更多
V$LOGFILEV$LOGFILE contains information about redo log files.
Column
Datatype,Description,GROUP#,NUMBER
Redo log group identifier number

STATUS
VARCHAR2(7)
Status of the log member:
INVALID - File is inaccessible
STALE - File's contents are incomplete

这个怎么理解?
归档后会影响将来的recover吗?

可能存在的错误:
ORA-00346: REDO LOG FILE HAS STATUS 'STALE' [ID 1014824.6]
ORA-00345: redo log write error block %s count %s
ORA-00312: online log %s thread %s: '%s'
ORA-07376: sfwfb: write error, unable to write database block.
Here is the recommended procedure to deal with a stale redo log:
1. Issue the following query:
显示v$log 和 v$logfile 之间的关联(两个很重要的关于日志的视图):
        SELECT V2.GROUP#, MEMBER, V2.STATUS MEMBER_STATUS,
                V1.STATUS GROUP_STATUS
        FROM V$LOG V1, V$LOGFILE V2
        WHERE V1.GROUP# = V2.GROUP# AND V2.STATUS = 'STALE';

        This will show you the group status for all stale log files.

2. For each stale log file,
        2.a) If the GROUP_STATUS is 'INACTIVE', do nothing.  That implies
             Oracle has already checkpointed past that redo group, and thus
             its contents are no longer needed for instance recovery.
             Once the redo group becomes current again, the stale status of
             the log file will go away by itself.
        2.b) If the GROUP_STATUS is 'ACTIVE', go back to Step 1 and repeat
             the query a few more times.  This status usually means that
             the log group is no longer the current one, but the corresponding
             checkpoint has not completed yet.  Unless there is a problem,
             the log group should become inactive shortly.
        2.c) If the GROUP_STATUS is 'CURRENT', force a log switch now.

               ALTER SYSTEM SWITCH LOGFILE;

             This will also force a checkpoint.  If the checkpoint
             completes successfully, the contents of the redo group
             are no longer needed for instance recovery.  Go back to
             Step 1 and repeat the query a few more times until the
             log group becomes inactive.

        IMPORTANT: If the stale logfile belongs to an active group
        or the current group (cases 2.b and 2.c above), DO NOT ISSUE
        A SHUTDOWN ABORT UNTIL THE GROUP BECOMES INACTIVE.

3. Investigate the extent of the problem.
        Examine the alert.log file for this instance and the LGWR
        trace file, if one can be found in your background_dump_dest.
        See if there is any pattern to the problem.  Do you see any
        recent errors, such as ORA-312, referencing that particular log 
        file?  If so, there may be some corruption problem with the file
        or a problem with the I/O subsystem (disk, controllers, etc.)    . 
        If you are running any other Oracle version on any other platform

        If there is no pattern to the problem, it is more likely an
        isolated incident.

4. If you are archiving, make sure the log has been correctly archived.
        Before archiving a redo log group, the ARCH process actually
        verifies that its contents are valid.  If that is not the case,
        it issues an error such as ORA-255 ("error archiving log %s
        of thread %s, sequence # %s").  Therefore, if the log group to
        which the stale member belongs has been successfully archived,
        it means the redo contents of the group are good, and that
        archived log can be safely used for recovery.  ARCH errors, if
        any, will be reported in your alert.log file and in an ARCH
        trace file.

Explanation:
============

A stale redo log file is one that Oracle believes might be incomplete for some
reason.  This typically happens when a temporary error prevents the LGWR
background process from writing to a redo log group member.  If Oracle cannot
write to a redo log file at any one time, that log file can no longer be
trusted, and Oracle marks it as "STALE". This indicates that the log file
cannot be relied upon to provide all the data written to the log.
分享到:
评论

相关推荐

    Oracle v$sqlarea, v$sql, v$sqltext视图说明

    简单描述Oracle v$sqlarea, v$sql, v$sqltext视图说明

    oraclev$sessionv$session_wait用途详解

    在Oracle数据库管理与优化的过程中,`v$session`与`v$session_wait`视图扮演着至关重要的角色,它们提供了关于当前活动会话及其等待事件的详细信息,这对于诊断性能问题、理解数据库行为以及进行有效的资源管理至关...

    oracle_v$session_v$session_wait用途详解

    ### Oracle V$SESSION 和 V$SESSION_WAIT 的详细解析 #### 概述 Oracle 数据库提供了大量的动态性能视图(Dynamic Performance Views),其中 `V$SESSION` 和 `V$SESSION_WAIT` 是两个非常重要的视图,它们能够帮助...

    oracle 动态性能(V$)视图

    5. **缓冲区管理**:V$BUFFER_CACHE、V$DBFILE头和V$BH展示了缓冲区缓存的工作情况,包括命中率和缓存的块信息。 6. **I/O统计**:V$IOSTAT和V$DISKSTAT提供了磁盘I/O的统计信息,对优化I/O性能有重要作用。 7. **...

    oracle v$中文目录

    Oracle的`V$`动态性能视图是数据库管理系统中用于监控和诊断的关键组件,它提供了丰富的数据库运行状态信息。这些视图允许DBA(数据库管理员)实时查看和分析数据库的活动,从而优化性能、诊断问题和规划资源。以下...

    Oracle的V$性能视图学习大全

    比如,I/O负载均衡可以通过V$DATAFILE、V$FILESTAT和DBA_DATA_FILES等视图来进行;锁定问题可以通过V$SESSION、V$SESSION_WAIT等视图来识别并解决。 总而言之,Oracle的V$性能视图是DBA不可或缺的工具,它提供了...

    ORACLE应用中常见的傻瓜问题1000问-1

    ### ORACLE应用中常见的傻瓜问题1000问(精选知识点解析) #### 知识点1:如何查看系统被锁的事务时间? 在Oracle数据库中,了解哪些对象被锁定以及锁定的时间对于诊断性能问题至关重要。你可以使用以下SQL查询来...

    Oracle中Truncate表的恢复方法.pdf

    SELECT V$LOGFILE.MEMBER FROM V$LOG, V$LOGFILE WHERE V$LOG.STATUS='CURRENT' AND V$LOG.FIRST_TIME <='2017-05-25 14:27:16' AND V$LOG.GROUP#=V$LOGFILE.GROUP#; EXECUTE DBMS_LOGMNR.ADD_LOGFILE('D:\ORACLE\...

    oracle日志文件相关命令

    ALTER DATABASE ADD LOGFILE MEMBER '/home1/oracle/oradata/ora8i/log1a.log' TO GROUP 1, '/home1/oracle/oradata/ora8i/log2a.log' TO GROUP 2; 该命令将增加两个新的日志成员 log1a.log 和 log2a.log 到对应的...

    Oracle 如何规范清理v$archived_log记录实例详解

    Oracle数据库管理系统在运行过程中会产生大量的归档日志记录,这些记录存储在v$archived_log视图中。当归档日志数量过多时,不仅会影响数据库的性能,还可能导致管理上的困扰。本文将详细介绍如何规范清理v$archived...

    Oracle的V$性能视图学习大全.pdf

    Oracle数据库中的V$性能视图是一系列动态性能视图,这些视图提供了关于数据库内部操作的实时信息,包括系统统计、性能数据和配置信息等。V$视图是DBA诊断问题、优化性能和进行日常数据库管理不可或缺的工具。 在...

    数据库命令

    select GROUP#,MEMBER from v$logfile; ``` 获取每个重做日志文件的位置: ```sql select * from v$logfile; ``` 检查Oracle的归档日志策略和位置: ```sql archive log list ``` 查询Oracle数据库中的表空间及其...

    Oracle日志文件

    使用 SQL 命令:SELECT GROUP#,STATUS,TYPE,MEMBER FROM V$LOGFILE; 结果中,状态列(status)所显示常用状态的含义: * 空白:表示该文正在使用。 * stale:表示该文件中的内容是不完全的。 * invalid:表示该...

    (完整word版)Oracle数据库系统紧急故障处理方法.doc

    1. 确定损坏的重做日志的位置及其状态:select * from v$logfile; svrmgrl〉select * from v$log; 2. 如果数据库处于可用状态,可以使用select * from v$logfile; svrmgrl〉select * from v$log;来确定损坏的...

    Oracle-归档日志详解(运行模式、分类)

    Oracle 提供了两个视图用于维护在线重做日志:V$LOG 和 V$LOGFILE。通过这两个视图,可以查看和修改在线日志的信息。 V$LOG 视图用于查看在线日志的总体信息,包括日志文件的状态、类型、成员、是否为恢复目标文件...

    oracle 数据库常用数据字典梳理.docx

    动态视图的示例包括 v$datafile、v$librarycache、v$lock、v$log 等。 在 Oracle 数据库中,动态视图的名称都以 V_$ 开头,以便与静态视图区分。每个动态视图都有一个同义词,例如 V_$DATAFILE 的同义词是 V$DATA...

    oracle19c所有版本通用时区版本34补丁p29997937_190000_Linux-x86-64_34版本.zip

    可通过SQL> SELECT * FROM v$timezone_file;命令查询时区版本 安装过程可以查看我的文章https://blog.csdn.net/weixin_43885834/article/details/105745901 安装补丁后还需要调整时区到最新,调整时区脚本 ...

    Oracle数据库基本常用命令汇总

    控制文件是Oracle数据库的关键组件,通过`v$archived_log`, `v$backup`, `v$datafile`, `v$log`, `v$logfile`, `v$loghist`, `v$tablespace`, `v$tempfile`等视图,可以获取与控制文件相关的信息。 12. **控制文件...

Global site tag (gtag.js) - Google Analytics