`
itspace
  • 浏览: 978457 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Oracle 10g数据库闪回之后怎么样noresetlogs打开数据库(二)

 
阅读更多
此方法采用重建控制文件:详见测试过程,具体过程不解释
[ora10g@xe2 lank]$ sqlplus "/as sysdba"                                                      
                                                                                             
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Oct 13 13:13:11 2011                        
                                                                                             
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.                                      
                                                                                             
Connected to an idle instance.                                                               
                                                                                             
SQL> startup mount                                                                           
ORACLE instance started.                                                                     
                                                                                             
Total System Global Area 1069547520 bytes                                                    
Fixed Size                  2101704 bytes                                                    
Variable Size             276827704 bytes                                                    
Database Buffers          784334848 bytes                                                    
Redo Buffers                6283264 bytes                                                    
Database mounted.                                                                            
SQL> create restore point dd guarantee flashback database;                                   
                                                                                             
Restore point created.                                                                       
                                                                                             
SQL> shutdown immediate                                                                      
ORA-01109: database not open                                                                 
                                                                                             
                                                                                             
Database dismounted.                                                                         
ORACLE instance shut down.                                                                   
SQL> exit                                                                                    
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options                
[ora10g@xe2 lank]$ cp redo01.log redo01.log.bak                                                                                                          
[ora10g@xe2 lank]$ cp redo02.log redo02.log.bak                                              
[ora10g@xe2 lank]$ cp redo03.log redo03.log.bak                                              
[ora10g@xe2 lank]$ cp control01.ctl control01.ctl.bak                                        
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$ sqlplus "/as sysdba"                                                      
                                                                                             
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Oct 13 13:13:52 2011                        
                                                                                             
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.                                      
                                                                                             
Connected to an idle instance.                                                               
                                                                                             
SQL> startup                                                                                 
ORACLE instance started.                                                                     
                                                                                             
Total System Global Area 1069547520 bytes                                                    
Fixed Size                  2101704 bytes                                                    
Variable Size             276827704 bytes                                                    
Database Buffers          784334848 bytes                                                    
Redo Buffers                6283264 bytes                                                    
Database mounted.                                                                            
Database opened.                                                                             
SQL> alter system switch logfile;                                                            
                                                                                             
System altered.                                                                              
                                                                                             
SQL> /                                                                                       
                                                                                             
System altered.                                                                              
                                                                                             
SQL> /                                                                                       
                                                                                             
System altered.                                                                              
                                                                                             
SQL> /                                                                                       
                                                                                             
System altered.                                                                              
                                                                                             
SQL> /                                                                                       
                                                                                             
System altered.                                                                              
                                                                                             
SQL> shutdown immediate                                                                      
Database closed.                                                                             
Database dismounted.                                                                         
ORACLE instance shut down.                                                                   
SQL> startup mount                                                                           
ORACLE instance started.                                                                     
                                                                                             
Total System Global Area 1069547520 bytes                                                    
Fixed Size                  2101704 bytes                                                    
Variable Size             276827704 bytes                                                    
Database Buffers          784334848 bytes                                                    
Redo Buffers                6283264 bytes                                                    
Database mounted.                                                                            
SQL> flashback database to restore point dd;                                                 
                                                                                             
Flashback complete.                                                                          
                                                                                             
SQL> shutdown immediate                                                                      
ORA-01109: database not open                                                                 
                                                                                             
                                                                                             
Database dismounted.                                                                         
ORACLE instance shut down.                                                                   
SQL> exit                                                                                    
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options                
[ora10g@xe2 lank]$ cp control01.ctl.bak control01.ctl                                        
cp control01.ctl.bak control02.ctl                                                           
cp control01.ctl.bak control03.ctl                                                           
cp redo01.log.bak redo01.log                                                                 
[ora10g@xe2 lank]$ cp control01.ctl.bak control02.ctl                                        
cp redo02.log.bak redo02.log                                                                 
cp redo03.log.bak redo03.log                                                                 
[ora10g@xe2 lank]$ cp control01.ctl.bak control03.ctl                                        
[ora10g@xe2 lank]$ cp redo01.log.bak redo01.log                                              
[ora10g@xe2 lank]$ cp redo02.log.bak redo02.log                                              
[ora10g@xe2 lank]$ cp redo03.log.bak redo03.log                                              
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$                                                                           
[ora10g@xe2 lank]$ sqlplus "/as sysdba"                                                      
                                                                                             
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Oct 13 13:16:38 2011                        
                                                                                             
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.                                      
                                                                                             
Connected to an idle instance.                                                               
                                                                                             
SQL> startup mount                                                                           
ORACLE instance started.                                                                     
                                                                                             
Total System Global Area 1069547520 bytes                                                    
Fixed Size                  2101704 bytes                                                    
Variable Size             276827704 bytes                                                    
Database Buffers          784334848 bytes                                                    
Redo Buffers                6283264 bytes                                                    
Database mounted.                                                                            
SQL> drop restore point dd;                                                                  
                                                                                             
Restore point dropped.                                                                       
                                                                                             
SQL> select file#,to_char(checkpoint_change#) from v$datafile_header;                        
                                                                                             
     FILE# TO_CHAR(CHECKPOINT_CHANGE#)                                                       
---------- ----------------------------------------                                          
         1 10999733119326                                                                    
         2 10999733119326                                                                    
         3 10999733119326                                                                    
         4 10999733119326                                                                    
                                                                                             
SQL> select file#,to_char(checkpoint_change#) from v$datafile;                               
                                                                                             
     FILE# TO_CHAR(CHECKPOINT_CHANGE#)                                                       
---------- ----------------------------------------                                          
         1 10999733119326                                                                    
         2 10999733119326                                                                    
         3 10999733119326                                                                    
         4 10999733119326                                                                    
                                                                                             
SQL> alter database backup controlfile to trace;                                             
                                                                                             
Database altered.                                                                            
                                                                                             
SQL> shutdown immediate                                                                      
startup nomount                                                                              
ORA-01109: database not open                                                                 
                                                                                             
                                                                                             
Database dismounted.                                                                         
ORACLE instance shut down.                                                                   
SQL> ORACLE instance started.                                                                
                                                                                             
Total System Global Area 1069547520 bytes                                                    
Fixed Size                  2101704 bytes                                                    
Variable Size             276827704 bytes                                                    
Database Buffers          784334848 bytes                                                    
Redo Buffers                6283264 bytes                                                    
SQL> CREATE CONTROLFILE REUSE DATABASE "LANK" NORESETLOGS  ARCHIVELOG                        
  2      MAXLOGFILES 16                                                                      
  3      MAXLOGMEMBERS 3                                                                     
  4      MAXDATAFILES 100                                                                    
  5      MAXINSTANCES 8                                                                      
  6      MAXLOGHISTORY 292                                                                   
  7  LOGFILE                                                                                 
  8    GROUP 1 '/lank/db/lank/redo01.log'  SIZE 50M,                                         
  9    GROUP 2 '/lank/db/lank/redo02.log'  SIZE 50M,                                         
10    GROUP 3 '/lank/db/lank/redo03.log'  SIZE 50M                                          
11  -- STANDBY LOGFILE                                                                      
12  DATAFILE                                                                                
13    '/lank/db/lank/system01.dbf',                                                         
14    '/lank/db/lank/undotbs01.dbf',                                                        
15    '/lank/db/lank/sysaux01.dbf',                                                         
16    '/lank/db/lank/users01.dbf'                                                           
17  CHARACTER SET WE8ISO8859P1                                                              
18  ;                                                                                       
                                                                                             
Control file created.                                                                        
                                                                                             
SQL> alter database open;                                                                    
                                                                                             
分享到:
评论

相关推荐

    Open resetlogs操作对Oracle数据库恢复的影响.pdf

    3. Oracle数据库的版本特性:Oracle9i与Oracle10g及以上版本在数据库恢复操作中的差异,特别是对于resetlogs操作和归档日志新格式的应用。 4. 数据库备份的策略和技巧:掌握如何在不同的应用场景下,制定合理的...

    Oracle数据库系统紧急故障处理方法.txt

    ### Oracle数据库系统紧急故障处理方法 #### 一、Oracle数据库物理结构故障概述 Oracle数据库物理结构故障是指由数据库构成的各个物理文件损坏所导致的一系列数据库故障。这类故障的发生原因通常有两种:一种是由...

    oracle数据库故障紧急处理预案.doc

    Oracle 数据库故障紧急处理预案 本文档旨在为 Oracle 数据库管理员提供一份紧急处理预案,以便在数据库故障时能够快速恢复数据库。 Oracle 数据库故障可能是由于硬件故障或人为误操作引起的,因此在处理故障时首先...

    恢复Oracle数据库控制文件.pdf

    Oracle数据库的控制文件是系统的重要组成部分,记录了数据库的关键配置信息,如数据库名称、字符集、数据文件的位置等。一旦控制文件损坏或丢失,数据库无法正常启动,这是一个严重的问题。以下是如何恢复Oracle...

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

    Oracle数据库系统紧急故障处理方法 Oracle数据库系统紧急故障处理方法是指在Oracle数据库系统出现故障时,如何快速诊断和解决问题的方法。本文将介绍Oracle数据库系统中的常见故障类型及其解决方法。 一、控制文件...

    BE oracle数据库还原注意事项.docx

    Oracle数据库是企业级广泛使用的数据库管理系统,其备份与恢复机制对于数据安全性至关重要。在使用BE (Backup Exec) 2012工具进行Oracle数据库备份和还原时,有一些关键的注意事项需要了解,以确保数据的完整性和...

    Oracle数据库系统紧急故障处理方法

    Oracle数据库系统紧急故障处理方法 Oracle数据库系统紧急故障处理方法是指在数据库系统出现紧急故障时,通过一定的处理步骤和方法来恢复数据库系统的正常运行。这种方法通常用于解决Oracle数据库系统中的物理结构...

    Oracle备份与恢复讲义(3)

    这部分可能还会讲解到数据库的闪回功能,如闪回数据库、闪回表空间等,这些技术能够在不依赖备份的情况下进行数据恢复。 在具体的技术细节中,讲义提到了【复制数据库】的操作,这是一种验证备份完整性的方法。复制...

    数据库的物理结构(4).ppt

    在Oracle数据库系统中,物理结构包括控制文件、数据文件和重做日志文件等关键组件。 控制文件是Oracle数据库的核心元素之一,它记录并维护了数据库的物理结构和状态信息。当数据库启动时,Oracle会根据初始化参数`...

    Oracle案例:损坏控制文件的恢复方法

    Oracle 数据库的控制文件是数据库的核心组件之一,对数据库的正常运行起着至关重要的作用。然而,控制文件的损坏可能会导致数据库无法启动或出错。因此,了解如何恢复损坏的控制文件是非常重要的。本文将介绍两种...

    非归档模式system表空间损坏数据库恢复.docx

    根据给定的部分内容来看,数据库管理员尝试启动一个处于非归档模式下的Oracle 11g数据库时遇到了以下问题: 1. **数据库状态为MOUNTED**:尝试查询数据库版本时收到ORA-01219错误提示,表明数据库当前处于MOUNTED...

    oracle六种物理文件.pdf

    控制文件是Oracle数据库中极为重要的组成部分之一,它是一个二进制文件,用于存储关于整个数据库的重要信息,包括数据库的结构信息。控制文件对于数据库的正常运行至关重要,因为它是数据库能够识别其组成元素的关键...

    案例解决:一次oracle掉电的处理过程

    在本案例中,我们遇到了一个Oracle数据库在服务器主板故障后无法正常启动的问题。数据库在重启后尝试打开时,出现了ORA-01589错误,提示必须使用RESETLOGS或NORESETLOGS选项进行数据库打开。这通常意味着数据库在...

    oracle无备份回复各种场景处理

    在Oracle数据库管理中,无备份恢复(也称为灾难恢复)是一项关键技能,尤其是在面对各种突发情况时。本文将深入探讨在没有备份的情况下,如何处理Oracle数据库的多种常见故障场景,包括恢复密码文件、参数文件、控制...

    ORACLE备份恢复

    Oracle数据库的备份与恢复是确保数据安全和业务连续性的重要环节。本文主要探讨了Oracle数据库在不同场景下如何进行有效的备份恢复,特别是针对控制文件损坏的情况。 首先,控制文件是Oracle数据库的关键组件,它...

    oracle总结

    根据给定的Oracle相关命令和描述,我们可以总结出以下关键知识点: ...以上知识点覆盖了Oracle数据库中的多个核心领域,包括内存管理、文件管理、用户管理、日志管理和性能调优,是理解和操作Oracle数据库的重要基础。

    详细讲解Oracle物理结构故障的处理方法

    Oracle数据库的物理结构是其运行的基础,当这些结构发生故障时,可能会对数据库的正常运行造成严重影响。本文将深入探讨如何处理Oracle物理结构中的常见故障,主要包括控制文件损坏、单个或所有控制文件损坏以及重做...

    ORACLE之FAQ -- 备份与恢复

    在Oracle数据库中,切换归档模式(Archivelog Mode)与非归档模式(NoArchivelog Mode)是进行备份与恢复的基础步骤之一。归档模式下,数据库会自动保存所有更改日志,这为数据库提供了完整的历史记录,便于灾难恢复...

Global site tag (gtag.js) - Google Analytics