oracle丢失损坏控制文件ORA-00227 ORA-00205没有备份如何恢复
1、oracle启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | [oracle@oracle1 orcl]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 11 14:18:33 2023 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 4977278976 bytes Fixed Size 2261768 bytes Variable Size 1006636280 bytes Database Buffers 3959422976 bytes Redo Buffers 8957952 bytes ORA-00205: error in identifying control file , check alert log for more info 或者 ORA-00227:控制文件中检测到损坏的块:(块40, #块 1) |
2、另外一台oracle生成模板
1 | alter database backup controlfile to trace as '/tmp/cfop.ctl' ; |
3、修改配置、修改库名称、修改日志文件(大小必须和以前一样)、数据文件路径
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | [oracle@oracle1 orcl]$ cat /tmp/cfop .ctl STARTUP NOMOUNT FORCE; CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 1168 LOGFILE GROUP 1 '/u01/oracle/oradata/orcl/redo01.log' SIZE 512M BLOCKSIZE 512, GROUP 2 '/u01/oracle/oradata/orcl/redo02.log' SIZE 512M BLOCKSIZE 512, GROUP 3 '/u01/oracle/oradata/orcl/redo03.log' SIZE 512M BLOCKSIZE 512 DATAFILE '/u01/oracle/oradata/orcl/users01.dbf' , '/u01/oracle/oradata/orcl/undotbs01.dbf' , '/u01/oracle/oradata/orcl/sysaux01.dbf' , '/u01/oracle/oradata/orcl/system01.dbf' , '/u01/oracle/oradata/orcl/test01.dbf' , '/u01/oracle/oradata/orcl/test02.dbf' , '/u01/oracle/oradata/orcl/test03.dbf' , '/u01/oracle/oradata/orcl/test04.dbf' , '/u01/oracle/oradata/orcl/test05.dbf' , '/u01/oracle/oradata/orcl/part_Data1.dbf' , '/u01/oracle/oradata/orcl/part_Data2.dbf' , '/u01/oracle/oradata/orcl/part_Data3.dbf' CHARACTER SET AL32UTF8 ; RECOVER DATABASE ALTER DATABASE OPEN; |
4、还原启动数据库:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | [oracle@oracle1 orcl]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue Jul 11 14:24:52 2023 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> @ /tmp/cfop .ctl ORACLE instance started. Total System Global Area 4977278976 bytes Fixed Size 2261768 bytes Variable Size 1006636280 bytes Database Buffers 3959422976 bytes Redo Buffers 8957952 bytes Control file created. Database altered. SQL> select status from v $instance; STATUS ------------ OPEN |
做一个决定,并不难,难的是付诸行动,并且坚持到底。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
2022-07-11 chfs共享系统搭建
2020-07-11 keepalived+nginx负载安装