重庆思庄Oracle、、PostgreSQL、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4231|回复: 0
打印 上一主题 下一主题

模拟控制文件受损的修复办法

[复制链接]
跳转到指定楼层
楼主
发表于 2012-12-6 11:15:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

[oracle@dbserver sztech1]$ pwd
/oracle/app/oracle/oradata/sztech1
[oracle@dbserver sztech1]$ ls
example01.dbf  redo02.log  sysaux01.dbf  temp01.dbf     users01.dbf
redo01.log     redo03.log  system01.dbf  undotbs01.dbf
执行破坏动作,将一个控制文件删掉。
[oracle@dbserver sztech1]$ rm -f control01.ctl
重启后就会出错,如:
SQL> startup nomount

ORACLE instance started.

Total System Global Area  313860096 bytes
Fixed Size                  1336232 bytes
Variable Size             234884184 bytes
Database Buffers           71303168 bytes
Redo Buffers                6336512 bytes
SQL>   1* alter database archivelog
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info


解决办法:
将另一个控制文件复制到丢失的控制文件目录下
[oracle@dbserver sztech1]$ pwd
/oracle/app/oracle/flash_recovery_area/sztech1
[oracle@dbserver sztech1]$ cp control02.ctl

/oracle/app/oracle/oradata/sztech1/control01.ctl
[oracle@dbserver sztech1]$ cd /oracle/app/oracle/oradata/sztech1
[oracle@dbserver sztech1]$ ls
control01.ctl  redo01.log  redo03.log    system01.dbf  undotbs01.dbf
example01.dbf  redo02.log  sysaux01.dbf  temp01.dbf    users01.dbf
这时候就能执行成功了
SQL> r
  1* alter database mount

Database altered.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2025-4-20 10:21 , Processed in 0.077631 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表