ITPub博客

首页 > 数据库 > Oracle > 备份恢复实验(1)丢失部分控制文件

备份恢复实验(1)丢失部分控制文件

原创 Oracle 作者:路途中的人2012 时间:2016-03-11 11:51:08 0 删除 编辑
001 关闭数据库

点击(此处)折叠或打开

  1. SYS@ORCL> shutdown immediate
  2. Database closed.
  3. Database dismounted.
  4. ORACLE instance shut down.
  5. SYS@ORCL> quit
  6. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  7. With the Partitioning, OLAP, Data Mining and Real Application Testing options
002 在操作系统级别删除一个控制文件

点击(此处)折叠或打开

  1. [oracle@hhu ~] rm /u01/app/oracle/oradata/ORCL/control01.ctl
003 尝试打开数据库,报错

点击(此处)折叠或打开

  1. [oracle@hhu ~]$ sqlplus / as sysdba

  2. SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 11 09:55:29 2016

  3. Copyright (c) 1982, 2013, Oracle. All rights reserved.

  4. Connected to an idle instance.

  5. SYS@ORCL> startup mount
  6. ORACLE instance started.

  7. Total System Global Area 1653518336 bytes
  8. Fixed Size         2253784 bytes
  9. Variable Size         1006636072 bytes
  10. Database Buffers     637534208 bytes
  11. Redo Buffers         7094272 bytes
  12. ORA-00205: error in identifying control file, check alert log for more info
004 根据提示进入alert.log查看被删除的控制文件名及其具体路径(假定事先不知道被删除的控制文件具体路径及控制文件名)

点击(此处)折叠或打开

  1. [oracle@hhu ~]$ cd /u01/app/oracle/diag/rdbms/orcl/ORCL/trace
  2. [oracle@hhu trace]$ cat alert_ORCL.log
  3. ALTER DATABASE MOUNT
  4. ORA-00210: cannot open the specified control file
  5. ORA-00202: control file: '/u01/app/oracle/oradata/ORCL/control01.ctl'
  6. ORA-27037: unable to obtain file status
  7. Linux-x86_64 Error: 2: No such file or directory
  8. Additional information: 3
  9. ORA-205 signalled during: ALTER DATABASE MOUNT...
005 关闭数据库,将完整的控制文件复制到alert.log提示的位置

点击(此处)折叠或打开

  1. SYS@ORCL> shutdown abort
  2. ORACLE instance shut down.
  3. [oracle@hhu ORCL]$ cp /u01/app/oracle/fast_recovery_area/ORCL/control02.ctl /u01/app/oracle/oradata/ORCL/control01.ctl
006 将数据库启动到mount状态,再将其open

点击(此处)折叠或打开

  1. SYS@ORCL> startup mount
  2. ORACLE instance started.

  3. Total System Global Area 1653518336 bytes
  4. Fixed Size         2253784 bytes
  5. Variable Size         1006636072 bytes
  6. Database Buffers     637534208 bytes
  7. Redo Buffers         7094272 bytes
  8. Database mounted.
  9. SYS@ORCL> alter database open;

  10. Database altered.
恢复成功。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29067253/viewspace-2055490/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-01-08

  • 博文量
    495
  • 访问量
    768390