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状态下恢复,恢复方法相同。

     

  • 相关阅读:
    2019-4-16-C#-使用反射获取私有属性的方法
    2019-5-21-C#-命令行如何静默调用-del-删除文件
    2019-6-14-WPF-shows-that-some-windows-in-multithreading-will-be-locked-in-the-PenThreadWorker-constr...
    2019-9-11-完整的-P2P-应用需要包含哪些功能
    2019-3-1-VisualStudio-扩展开发-获得输出窗口内容
    2018-10-19-C#-序列类为-xml-可以使用的特性大全
    2018-8-10-win10-uwp-手把手教你使用-asp-dotnet-core-做-cs-程序
    2018-10-31-win10-uwp-使用-asp-dotnet-core-做图床服务器客户端
    2018-8-10-docfx-做一个和微软一样的文档平台
    linux分区方案
  • 原文地址:https://www.cnblogs.com/liang545621/p/9406052.html
Copyright © 2011-2022 走看看