`

数据库非归档模式下丢失所有redo log 的恢复记录

阅读更多

SYS@huiches>startup                                                                                         
ORACLE 例程已经启动。                                                                                       
Total System Global Area  159383552 bytes                                                                   
Fixed Size                  1295608 bytes                                                                   
Variable Size              96471816 bytes                                                                   
Database Buffers           54525952 bytes                                                                   
Redo Buffers                7090176 bytes                                                                   
数据库装载完毕。                                                                                            
ORA-00313: 无法打开日志组 4 (用于线程 1) 的成员                                                             
ORA-00312: 联机日志 4 线程 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO04.LOG'                         
                                                                                                            
                                                                                                            
SYS@huiches>select * from v$log;                                                                            
    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARCHIV STATUS       FIRST_CHANGE# FIRST_TIME         
---------- ---------- ---------- ---------- ---------- ------ ------------ ------------- --------------     
         4          1          4   10485760          1 NO     INACTIVE     166685618 07-4月 -10             
         6          1          6   10485760          1 NO     CURRENT      166688926 07-4月 -10             
         5          1          5   10485760          1 NO     INACTIVE     166686751 07-4月 -10             
                                                                                                            
已用时间:  00: 00: 00.06                                                                                    
SYS@huiches>select * from v$logfile;                                                                        
    GROUP# STATUS   TYPE           MEMBER                                                     IS_REC        
---------- ------- -------------- --------------------------------- ------                                  
         6         ONLINE         D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO06.LOG          NO           
         5         ONLINE         D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO05.LOG          NO           
         4         ONLINE         D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO04.LOG          NO           
                                                                                                            
已用时间:  00: 00: 00.01                                                                                    
SYS@huiches>alter system clear logfile group 4;                                                             
alter system clear logfile group 4                                                                          
             *                                                                                              
第 1 行出现错误:                                                                                            
ORA-02065: 非法的 ALTER SYSTEM 选项                                                                         
                                                                                                            
                                                                                                            
已用时间:  00: 00: 00.06                                                                                    
SYS@huiches>alter database clear logfile group 4;                                                           
                                                                                                            
数据库已更改。                                                                                              
                                                                                                            
已用时间:  00: 00: 00.57                                                                                    
SYS@huiches>alter database open;                                                                            
alter database open                                                                                         
*                                                                                                           
第 1 行出现错误:                                                                                            
ORA-00313: 无法打开日志组 5 (用于线程 1) 的成员                                                             
ORA-00312: 联机日志 5 线程 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO05.LOG'                         
                                                                                                            
                                                                                                            
已用时间:  00: 00: 00.32                                                                                    
SYS@huiches>alter database clear logfile group 5;                                                           
                                                                                                            
数据库已更改。                                                                                              
                                                                                                            
已用时间:  00: 00: 00.54                                                                                    
SYS@huiches>alter database open;                                                                            
alter database open                                                                                         
*                                                                                                           
第 1 行出现错误:                                                                                            
ORA-00313: 无法打开日志组 6 (用于线程 1) 的成员                                                             
ORA-00312: 联机日志 6 线程 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO06.LOG'                         
                                                                                                            
                                                                                                            
已用时间:  00: 00: 00.36                                                                                    
SYS@huiches>alter database clear logfile group 6;                                                           
alter database clear logfile group 6                                                                        
*                                                                                                           
第 1 行出现错误:                                                                                            
ORA-00313: 无法打开日志组 6 (用于线程 1) 的成员                                                             
ORA-00312: 联机日志 6 线程 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO06.LOG'                         
ORA-27041: 无法打开文件                                                                                     
OSD-04002: ???????                                                                                       
O/S-Error: (OS 2) ????????????????                                                                    
                                                                                                            
                                                                                                            
已用时间:  00: 00: 00.07                                                                                    
SYS@huiches>alter system set "_allow_resetlogs_corruption"=true scope=spfile;                               
                                                                                                            
系统已更改。                                                                                                
                                                                                                            
已用时间:  00: 00: 00.06                                                                                    
SYS@huiches>shutdown immediate;                                                                             
ORA-01109: 数据库未打开                                                                                     
                                                                                                            
                                                                                                            
已经卸载数据库。                                                                                            
ORACLE 例程已经关闭。                                                                                       
SYS@huiches>startup mount;                                                                                  
ORACLE 例程已经启动。                                                                                       
Total System Global Area  159383552 bytes                                                                   
Fixed Size                  1295608 bytes                                                                   
Variable Size              96471816 bytes                                                                   
Database Buffers           54525952 bytes                                                                   
Redo Buffers                7090176 bytes                                                                   
数据库装载完毕。                                                                                            
SYS@huiches>recover database until cancel;                                                                  
完成介质恢复。                                                                                              
SYS@huiches>alter database open resetlogs;                                                                  
                                                                                                            
数据库已更改。                                                                                              
                                                                                                            
已用时间:  00: 00: 24.54                                                                                    
SYS@huiches>select count(*) from tt;                                                                        
  COUNT(*)                                                                                                  
----------                                                                                                  
     50720                                                                                                  
                                                                                                            
已用时间:  00: 00: 00.23                                                                                    
SYS@huiches>select * from v$log;                                                                            
    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARCHIV STATUS    FIRST_CHANGE# FIRST_TIME            
---------- ---------- ---------- ---------- ---------- ------ ----------------------- --------------        
         4          1          1   10485760          1 NO     CURRENT       166689035 07-4月 -10            
         5          1          0   10485760          1 YES    UNUSED                0                       
         6          1          0   10485760          1 YES    UNUSED                0                       
                                                                                                            
已用时间:  00: 00: 00.07                                                                                    
SYS@huiches>select * from v$logfile;                                                                        
    GROUP# STATUS   TYPE           MEMBER                                                       IS_REC      
---------- -------- -------------- ------------------------------------------------------------ ------      
         6          ONLINE         D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO06.LOG          NO          
         5          ONLINE         D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO05.LOG          NO          
         4          ONLINE         D:\ORACLE\PRODUCT\10.2.0\ORADATA\HUICHES\REDO04.LOG          NO          
                                                                                                            
已用时间:  00: 00: 00.03                                                                                    
SYS@huiches>alter system switch logfile;                                                                    
                                                                                                            
系统已更改。                                                                                                
                                                                                                            
已用时间:  00: 00: 00.09                                                                                    
SYS@huiches>alter system switch logfile;                                                                    
                                                                                                            
系统已更改。                                                                                                
                                                                                                            
已用时间:  00: 00: 00.07                                                                                    
SYS@huiches>show parameter _allow_resetlogs_corruption                                                      
NAME                                 TYPE                                                             VALUE 
------------------------------------ ---------------------------------------------------------------- ------
_allow_resetlogs_corruption          boolean                                                          TRUE  
                                                                                                            
SYS@huiches>alter system reset "_allow_resetlogs_corruption" scope=spfile sid='*';                          
                                                                                                            
系统已更改。                                                                                                
                                                                                                            
已用时间:  00: 00: 00.07                                                                                    
SYS@huiches>startup force;                                                                                  
ORACLE 例程已经启动。                                                                                       
Total System Global Area  159383552 bytes                                                                   
Fixed Size                  1295608 bytes                                                                   
Variable Size              96471816 bytes                                                                   
Database Buffers           54525952 bytes                                                                   
Redo Buffers                7090176 bytes                                                                   
数据库装载完毕。                                                                                            
数据库已经打开。                                                                                            

分享到:
评论

相关推荐

    Oracle数据库非归档模式重做日志恢复方法.pdf

    针对这一问题,本文提出了在非归档模式下恢复丢失重做日志的方法。 非归档模式是Oracle数据库的一种运行模式,其中重做日志文件不被备份。在这种模式下,如果重做日志文件损坏或丢失,通常会导致数据的不可恢复。而...

    丢失全部数据库文件及全部redolog的恢复方法,可用作RMAN数据库迁移.doc

    在Oracle数据库环境中,当面临丢失全部数据库文件及所有redo log文件的情况时,恢复过程变得非常复杂,因为这涉及到了数据库的全部数据文件、重做日志文件、控制文件甚至SPFILE。在这种极端情况下,通常只能依赖于...

    非归档模式下的冷备份和恢复.txt

    非归档模式下的冷备份与恢复是Oracle数据库管理中的一个重要环节。本文将详细介绍在非归档模式下如何进行冷备份及恢复操作,并基于提供的部分SQL命令进行深入解析。 ### 一、非归档模式简介 非归档模式是非归档...

    查看oracle数据库是否归档和修改归档模式

    归档模式允许数据库管理员将已完成的日志文件(Redo Log Files)复制到归档存储区域,这些归档日志文件可以用来恢复数据至某个时间点。这不仅能够有效预防灾难性的数据丢失,还能够在必要时进行数据恢复。 #### 二...

    行业-42 redo log是直接一条一条写入文件的吗?非也,揭秘redo log block.rar

    redo log,或者称为重做日志,是数据库系统中用于记录事务对数据的更改操作的重要组件,特别是对于保证数据的一致性和恢复性至关重要。在Oracle、MySQL等数据库系统中,redo log扮演着不可或缺的角色。标题和描述...

    oracle的归档模式

    在Oracle数据库系统中,联机重做日志(Online Redo Log)是记录数据库事务操作的关键组件,它保存了对数据库的所有修改记录。每个数据库至少包含两个重做日志组,以便在一组填满后进行日志切换。 在非归档模式...

    归档模式恢复数据文件

    当数据库处于归档模式时,所有的重做日志(redo log)文件都会被归档到指定的位置,这使得即使发生介质故障或数据库崩溃,也可以通过归档的日志文件来恢复丢失的数据。 #### 恢复误删除的数据文件 在Oracle数据库中...

    数据库归档日志管理方案

    在非归档模式下,重做日志文件(Redo Log Files)中的数据仅保存到最后一次完整备份完成,之后会被覆盖,这意味着一旦发生灾难性故障,所有未备份的数据都将丢失。而在归档模式下,当重做日志文件写满时,系统会将其...

    oracle 归档与非归档的区别

    在非归档模式下,Oracle数据库的联机重做日志(Online Redo Log Files)在完成一次日志切换后会被复用或覆盖,这意味着一旦发生系统故障或数据丢失,除了最后一次完全备份之外,中间的所有更改都无法恢复。这种模式...

    rac数据库修改redolog日志组大小及数量.docx

    上述操作的目的在于解决数据库中Alert Log记录的归档日志不完全的问题,通过增加Redo Log日志组的数量和大小,降低了日志切换的频率,从而减少了因日志满而引发的问题。例如,在警报日志中出现类似以下的信息: ```...

    丢失所有redo-数据文件-控制文件的恢复

    在IT领域,尤其是在数据库管理与恢复方面,遇到“丢失所有redo-数据文件-控制文件的恢复”这种情况无疑是一场灾难性的事件。这通常意味着数据库的所有关键组成部分:重做日志(redo log)、数据文件(datafiles)以及...

    删除归档日志、更改归档模式

    当数据库运行在归档模式下,每次事务提交时,系统都会将redo log(重做日志)文件中不可变的信息复制到归档日志文件中。这使得数据库能够进行时间点恢复,即在发生故障后,能够恢复到特定的时间点,确保数据的完整性...

    oracle 11gR2 rac 改为归档模式

    在非归档模式下,数据库的日志文件(redo logs)一旦被写满并切换到新的日志文件时,旧的日志文件会被覆盖,这意味着如果在此过程中发生故障,可能会导致部分未提交的事务丢失。而在归档模式下,redo log文件在被写...

    oracle 归档模式

    归档模式下,数据库的所有事务日志(redo log)都会被归档保存,这意味着即使主数据库文件损坏或丢失,也能够通过归档的日志文件进行数据恢复。 #### 二、如何判断Oracle是否处于归档模式 要确定Oracle数据库是否...

    oracle非归档模式丢失全部联机日志后的处理方法

    在 Oracle 非归档模式下,丢失全部联机日志文件后,数据库无法启动,需要进行处理以恢复数据库。以下是处理方法的详细步骤和注意事项: 第一步:备份数据文件和参数文件 在进行任何处理前,首先需要备份数据文件和...

    Oracle归档模式的命令及参数说明

    归档模式下,Oracle会记录每次数据库更改的重做日志(redo log),这些记录被称为归档日志,它们在重做日志文件轮换后被保存,以便在需要时进行恢复操作。 在非归档模式(Noarchivelog Mode)下,一旦重做日志文件...

    Archive Log 学习笔记 --oracle 数据库

    Oracle数据库中的归档日志(Archive Log)是数据库在运行过程中产生的一种重要数据记录,它存储了数据库事务的完整历史,对于数据保护、故障恢复和多版本并发控制(MVCC)有着至关重要的作用。这篇学习笔记将深入...

    Oracle备份和归档模式下的恢复.pdf

    归档模式是Oracle数据库的一种运行模式,它在数据库正常运行的同时记录所有的更改到归档日志中。当数据库发生故障时,除了常规的数据文件和控制文件恢复,还需要利用归档日志进行前滚操作以恢复到故障点之前的状态。...

Global site tag (gtag.js) - Google Analytics