zoukankan      html  css  js  c++  java
  • 备份恢复-----system表空间损坏

    无法进行关库,报错如下

    SQL> shutdown immediate
    ORA-01122: database file 1 failed verification check
    ORA-01110: data file 1: '/u01/app/oracle/oradata/cuug/system01.dbf'
    ORA-01210: data file header is media corrupt
    SQL>

    只能启动到mount状态

    SQL> startup
    ORACLE instance started.

    Total System Global Area 425897984 bytes
    Fixed Size 2226656 bytes
    Variable Size 322962976 bytes
    Database Buffers 96468992 bytes
    Redo Buffers 4239360 bytes
    Database mounted.
    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
    ORA-01110: data file 1: '/u01/app/oracle/oradata/cuug/system01.dbf'

    SQL>

    手动删除system表空间的数据文件

    [root@solaris186:/u01/app/oracle/oradata/cuug]# ls
    control01.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
    control02.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf
    [root@solaris186:/u01/app/oracle/oradata/cuug]# rm -rf system01.dbf
    [root@solaris186:/u01/app/oracle/oradata/cuug]# ls
    control01.ctl redo01.log redo03.log temp01.dbf users01.dbf
    control02.ctl redo02.log sysaux01.dbf undotbs01.dbf
    [root@solaris186:/u01/app/oracle/oradata/cuug]#

    在rman下启动到mount状态下

    RMAN> startup mount

    connected to target database (not started)
    Oracle instance started
    database mounted

    Total System Global Area 425897984 bytes

    Fixed Size 2226656 bytes
    Variable Size 322962976 bytes
    Database Buffers 96468992 bytes
    Redo Buffers 4239360 bytes

    RMAN>

    转储datafile 1

    RMAN> restore datafile 1;

    Starting restore at 29-SEP-15
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=18 device type=DISK

    channel ORA_DISK_1: starting datafile backup set restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/cuug/system01.dbf
    channel ORA_DISK_1: reading from backup piece /backup/02qidfdl_1_1.bak
    channel ORA_DISK_1: piece handle=/backup/02qidfdl_1_1.bak tag=TAG20150929T230940
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 00:01:55
    Finished restore at 29-SEP-15

    恢复datafile 1

    RMAN>recover datafile 1;

    Starting recover at 29-SEP-15
    using channel ORA_DISK_1

    starting media recovery
    media recovery complete, elapsed time: 00:00:01

    Finished recover at 29-SEP-15

    开库

    RMAN> alter database open ;

    database opened

    RMAN>

  • 相关阅读:
    XML Schema
    Magento 2 instantiate object by Factory Objects
    Magento 2 Factory Objects
    UML类图与类的关系详解
    Magento add product attribute and assign to all group
    MyISAM 和InnoDB的区别
    Finding the Right EAV Attribute Table
    Implement Trie (Prefix Tree)
    Graph Valid Tree
    Maximum Subarray III
  • 原文地址:https://www.cnblogs.com/wangqianqiannb/p/4847595.html
Copyright © 2011-2022 走看看