zoukankan      html  css  js  c++  java
  • 系统表空间数据文件损坏

    系统表空间损坏,启动实例会提示已下错误:数据库只能启动到mount状态。

    SQL> startup

    ORACLE instance started.

    Total System Global Area 1048059904 bytes

    Fixed Size                  2235000 bytes

    Variable Size             608175496 bytes

    Database Buffers          432013312 bytes

    Redo Buffers                5636096 bytes

    Database mounted.

    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

    ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'

    警告日志提示文件头损坏:

    ALTER DATABASE OPEN

    Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_dbw0_3715.trc:

    ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

    ORA-01110: data file 1: '/u01/app/oracle/oradata/orcl/system01.dbf'

    ORA-27048: skgfifi: file header information is invalid

    这里利用数据库之前做好的全备份恢复system01.dbf文件:

    回复步骤:

    A、      启动实例到mount状态,恢复系统表空间数据文件必须在数据库mount状态下进行。

    SQL> startup mount

    B、       在RMAN中,执行restore命令还原损坏的系统表空间文件。

    RMAN> restore datafile 1;

    Starting restore at 02-DEC-12

    using target database control file instead of recovery catalog

    allocated channel: ORA_DISK_1

    channel ORA_DISK_1: SID=20 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/orcl/system01.dbf

    channel ORA_DISK_1: reading from backup piece /u01/app/oracle/backup/full_ORCL_20121201_6_1.bak

    channel ORA_DISK_1: piece handle=/u01/app/oracle/backup/full_ORCL_20121201_6_1.bak tag=TAG20121201T193434

    channel ORA_DISK_1: restored backup piece 1

    channel ORA_DISK_1: restore complete, elapsed time: 00:00:35

    Finished restore at 02-DEC-12

    C、       在RMAN中,执行recover datafile 1 利用归档和在线日志恢复数据文件。

    RMAN> recover datafile 1;

    Starting recover at 02-DEC-12

    using channel ORA_DISK_1

    starting media recovery

    media recovery complete, elapsed time: 00:00:02

    Finished recover at 02-DEC-12

    D、      打开数据库,恢复完成。

    RMAN> alter database open;

    database opened

    如果数据库在运行过程中发现系统表空间数据文件损坏,要先关闭

    实例(shutdown abort),再启动到mount状态下恢复,恢复方法相同。

     

  • 相关阅读:
    Core Data Migration 之拆分Entity
    Core Data Migration 之拆分Entity
    对 Android 开发者有益的 40 条优化建议
    对 Android 开发者有益的 40 条优化建议
    超实用的Java数组技巧攻略分享!
    ls command not found
    苹果建议开发者在iOS 7正式发布之前把应用提交至App Store
    关于android SDK安装Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml出错
    Linux_系统时间管理
    Python_元组、字典内建方法详解
  • 原文地址:https://www.cnblogs.com/l10n/p/9406052.html
Copyright © 2011-2022 走看看