Welcome 微信登录

首页 / 数据库 / MySQL / 非法删除数据文件导致数据库不能打开ORA-01122 ORA-01251

今天一同事找我,说他本地的数据库被他误删除了文件,导致不能打开,然给看看。
SQL> conn jjw/jjw
ERROR:
ORA-01033: Oracle initialization or shutdown in progressWarning: You are no longer connected to ORACLE.
SQL>
数据库已经启动,但连接报错。如是,我重启一下,看报什么错误。
SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
ORA-01109: database not openDatabase dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size                  2020384 bytes
Variable Size             218106848 bytes
Database Buffers          989855744 bytes
Redo Buffers               14753792 bytes
Database mounted.
ORA-01122: database file 10 failed verification check
ORA-01110: data file 10: "/oracle/database/tabjj_tab.dbf"
ORA-01251: Unknown File Header Version read for file number 10SQL>
首先,得从数据库中删除这个有问题的文件。
SQL> startup mount
ORACLE instance started.
Total System Global Area 1224736768 bytes
Fixed Size                  2020384 bytes
Variable Size             218106848 bytes
Database Buffers          989855744 bytes
Redo Buffers               14753792 bytes
Database mounted.
SQL> alter database datafile  "/oracle/database/tabjj_tab.dbf" offline drop;
Database altered.
 
SQL> alter database open;
Database altered.
SQL>
数据库恢复正常。
 
以上只是测试环境下的操作,正式系统上,千万不能这样随意删除文件了。ORA-00918:未明确定义列清空 Oracle 闪回区相关资讯      Oracle错误日志 
  • Oracle 11g安装中遇到的问题及解决  (11/30/2012 18:49:13)
  • 重启数据库遇到PRCR-1079,CRS-  (08/17/2012 09:40:27)
  • ORA-32004 的错误处理  (08/04/2012 15:46:08)
  • ORA-01652,temp表空间不足的相关  (10/15/2012 15:50:12)
  • ORA-00245 错误解决  (08/17/2012 09:37:43)
  • ORA-04031错误的解决思路  (07/30/2012 15:14:18)
本文评论 查看全部评论 (0)
表情: 姓名: 字数