Home Database Mysql Tutorial Oracle 日志状态为stale解决方法

Oracle 日志状态为stale解决方法

Jun 07, 2016 pm 04:55 PM
oracle number

解决方法总结:1,千万不要在发生stale的情况下强制关闭数据库。2,多查询几次日志状态,看stale状态是否会消失。

SQLDBA> SELECT * FROM V$LOGFILE; 
 
    GROUP#       STATUS        MEMBER 
    ---------- ------- ------------------------------ 
             1          STALE           /Oracle/7.3.4/dbs/log1P734.dbf 
 
             2                              /oracle/7.3.4/dbs/log2P734.dbf 
 
             3                              /oracle/7.3.4/dbs/log3P734.dbf 

解决方法总结:

1,,千万不要在发生stale的情况下强制关闭数据库。

2,多查询几次日志状态,看stale状态是否会消失。

3,如果再数次查询无效后,可以切换日志。

4,切换日志过户,可以执行强制检查点操作。

5,不断切换日志,强制检查点,查询,直至stale状态消失。

WARNING: 

 DO NOT ISSUE A SHUTDOWN ABORT BEFORE GOING THROUGH STEPS 1 AND 2   BELOW.

Solution Description: 
===================== 
 
In general, the stale status of a redo log member should not be a cause for 
great concern, unless you observe that this happens frequently or 
systematically.  Keep in mind that a stale log is not necessarily an invalid 
log, but more of an "in-doubt" one. Once the corresponding redo group becomes 
the current one again, the stale status will go away by itself. 
 

Here is the recommended procedure to deal with a stale redo log: 

1. Issue the following query: 
 
        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.

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

How much memory is needed to use oracle database How much memory is needed to use oracle database May 10, 2024 am 03:42 AM

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).

How to start the listening program in oracle How to start the listening program in oracle May 10, 2024 am 03:12 AM

Oracle listeners are used to manage client connection requests. Startup steps include: Log in to the Oracle instance. Find the listener configuration. Use the lsnrctl start command to start the listener. Use the lsnrctl status command to verify startup.

What are the stages of Oracle database startup? What are the stages of Oracle database startup? May 10, 2024 am 03:15 AM

Oracle database startup is divided into 7 stages: 1. Initialization; 2. Instance recovery; 3. Archive log recovery; 4. Crash recovery; 5. Object opening; 6. Server preparation; 7. Server startup. The process involves loading library files, configuring parameters, restoring the database instance, applying archive logs, updating data files and objects, and finally starting the database service to accept queries.

Top 10 Global Digital Virtual Currency Trading Platform Ranking (2025 Authoritative Ranking) Top 10 Global Digital Virtual Currency Trading Platform Ranking (2025 Authoritative Ranking) Mar 06, 2025 pm 04:36 PM

In 2025, global digital virtual currency trading platforms are fiercely competitive. This article authoritatively releases the top ten digital virtual currency trading platforms in the world in 2025 based on indicators such as transaction volume, security, and user experience. OKX ranks first with its strong technical strength and global operation strategy, and Binance follows closely with high liquidity and low fees. Platforms such as Gate.io, Coinbase, and Kraken are at the forefront with their respective advantages. The list covers trading platforms such as Huobi, KuCoin, Bitfinex, Crypto.com and Gemini, each with its own characteristics, but investment should be cautious. To choose a platform, you need to consider factors such as security, liquidity, fees, user experience, currency selection and regulatory compliance, and invest rationally

Top 10 digital currency trading platforms The latest list of top 10 digital currency trading platforms Top 10 digital currency trading platforms The latest list of top 10 digital currency trading platforms Mar 17, 2025 pm 05:57 PM

Top 10 digital currency trading platforms: 1. OKX, 2. Binance, 3. Gate.io, 4. Huobi Global, 5. Kraken, 6. Coinbase, 7. KuCoin, 8. Bitfinex, 9. Crypto.com, 10. Gemini, these exchanges have their own characteristics, and users can choose the platform that suits them based on factors such as security, fees, currency selection, user interface and customer support.

See all articles