zoukankan      html  css  js  c++  java
  • 控制文件发生损坏,如何恢复

    1、You may need to create control files if:

    • All control files are lost because of a failure.
    • The name of a database needs to be changed.
    • The current settings in the control file need to be changed.

    2、The behavior of multiplexed control files is this:

    • The database writes to all filenames listed for the initialization parameter CONTROL_FILES in the database initializaton parameter file.

    oracle server 在往控制文件中写数据的时候,会同时往多个文件中写数据,而且内容是一样的.

    • The database reads only the first file listed in the CONTROL_FILES parameter during database operation.

    oracle server 在读控制文件的时候,只会读第一个控制文件,其他的不读.

    • If any of the control files become unavailable during database operation,the instance becomes inoperable and should be aborted.

    如果控制文件中的任何一个失效或者损坏,那么instance将会停止工作,此时DBA应当shutdown abort;

    3、对比动态性能试图

    SQL> select file#,checkpoint_change# from v$datafile_header;
    
         FILE# CHECKPOINT_CHANGE#
    ---------- ------------------
             1            1464420
             2            1464420
             3            1464420
             4            1464420
             5            1464420
             6            1464420
             7            1465263
    
    7 rows selected.

    动态性能试图v$datafile_header是通过读数据文件的头信息获取到的scn号

    SQL> select file#,checkpoint_change# from v$datafile;
    
         FILE# CHECKPOINT_CHANGE#
    ---------- ------------------
             1            1464420
             2            1464420
             3            1464420
             4            1464420
             5            1464420
             6            1464420
             7            1465263
    
    7 rows selected.

    动态性能试图v$datafile是通过读控制文件的信息,获取到scn号的.

     4、SCN Scenarios

    Condition on Start-Up Oracle Behavior DBA Action
    CF checkpoint SCN<Datafile checkpoint SCN "Control file too old" error Restore a newer control file.
    CF checkpoint SCN>Datafile checkpoint SCN Media recovery required Most likely a datafile has been restored from a backup.Recovery is now required.

    (CF checkpoint SCN=Datafile SCN)

    Database in mount mode,instance thread status=OPEN

    Start up normally

    Crash recovery required

    None

    None

    5、控制文件恢复的方法

    (a)、控制文件丢失一个,其他文件完好无损,直接拷贝另外的控制文件或者修改spfile文件都可以重新恢复数据库;

    (b)、所有的控制文件都损坏,根据trace file进行脚本执行,然后恢复控制文件即可;

  • 相关阅读:
    316 Remove Duplicate Letters 去除重复字母
    315 Count of Smaller Numbers After Self 计算右侧小于当前元素的个数
    313 Super Ugly Number 超级丑数
    312 Burst Balloons 戳气球
    309 Best Time to Buy and Sell Stock with Cooldown 买股票的最佳时间含冷冻期
    Java 类成员的初始化顺序
    JavaScript 全局
    HTML字符实体
    Java中的toString()方法
    JavaScript 弹窗
  • 原文地址:https://www.cnblogs.com/arcer/p/2984350.html
Copyright © 2011-2022 走看看