ORA-01251错误oracle服务启动无法连接误删非法删除数据文件导致数据库不能打开ORA-01122 ORA-01251

本文记录了一次在测试环境中修复因文件误删而导致无法正常启动的Oracle数据库的过程。通过一系列命令,成功离线并删除了问题文件,最终使数据库恢复正常运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天一同事找我,说他本地的数据库被他误删除了文件,导致不能打开,然给看看。
SQL> conn jjw/jjw
ERROR:
ORA-01033: Oracle initialization or shutdown in progress


Warning: You are no longer connected to ORACLE.
SQL>
数据库已经启动,但连接报错。如是,我重启一下,看报什么错误。
SQL> conn /as sysdba
Connected.
SQL> shutdown immediate
ORA-01109: database not open


Database 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 10


SQL>
首先,得从数据库中删除这个有问题的文件。
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>
数据库恢复正常。
 

以上只是测试环境下的操作,正式系统上,千万不能这样随意删除文件了。

转载地址 :http://www.linuxidc.com/Linux/2012-07/65852.htm

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值