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进行脚本执行,然后恢复控制文件即可;

  • 相关阅读:
    没时间写文章::>_<::
    使 iis 支持 flv 视频播放
    CentOS7系统配置国内yum源(阿里云)
    android adb启动失败问题 adb server is out of date. killing... ADB server didn't ACK * failed to start daemon *
    android开发 获取手机分辨率大小
    c++流操作>rdbuf()
    ROR:Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'
    android map如何获得Google Map API key
    Android有效解决加载大图片时内存溢出的问题
    Android开发之Intent跳转到系统应用中的拨号界面、联系人界面、短信界面
  • 原文地址:https://www.cnblogs.com/arcer/p/2984350.html
Copyright © 2011-2022 走看看