sqlplus以管理员方式接入数据库,启动时出现报错,如下:

> sqlplus "/as sysdba"

SQL> startup

......

ORA-01157: cannot identify/lock data file 8 - see DBWR trace file

ORA-01110: data file 8: '/tmp/test.dbf'

查看数据库日志文件alert_$ORACLE_SID.log,存在对应报错信息:

Errors in file ....../aix85_psp0_454886.trc:

查看此trc文件中记录信息:

*** SERVICE NAME:() 2011-07-18 10:05:00.769

*** SESSION ID:(332.1) 2011-07-18 10:05:00.769

ORA-01157: cannot identify/lock data file 8 - see DBWR trace file

ORA-01110: data file 8: '/tmp/test.dbf'

ORA-27037: unable to obtain file status

IBM AIX RISC System/6000 Error: 2: No such file or directory

Additional information: 3

ORA-01157: cannot identify/lock data file 9 - see DBWR trace file

ORA-01110: data file 9: '/tmp/test1.dbf'

ORA-27037: unable to obtain file status

IBM AIX RISC System/6000 Error: 2: No such file or directory

Additional information: 3

ORA-01157: cannot identify/lock data file 10 - see DBWR trace file

ORA-01110: data file 10: '/tmp/indx1.dbf'

ORA-27037: unable to obtain file status

IBM AIX RISC System/6000 Error: 2: No such file or directory

Additional information: 3

ORA-01157: cannot identify/lock data file 11 - see DBWR trace file

ORA-01110: data file 11: '/tmp/test2.dbf'

ORA-27037: unable to obtain file status

IBM AIX RISC System/6000 Error: 2: No such file or directory

Additional information: 3

ORA-01157: cannot identify/lock data file 12 - see DBWR trace file

查询分析:

查看/tmp目录中已经没有任何dbf文件存在,查询确认/tmp目录中的几个dbf是在之前数据库运行过程中添加的测试空间文件,测试完毕已经删除,而且后续没有任何人访问到这几个文件,因此也没有任何数据库报错,直到数据库实例宕掉并重启时出现启动失败。

解决办法:

既然出现报错的几个dbf文件已经不用,则解决办法相对简单,只要将对应的数据文件删除,并继续删除对应新增的表空间即可。操作过程如下:

SQL> shutdown immediate;

SQL> startup mount;

SQL> select file#,name,status from v$datafile;

SQL> alter database datafile '/tmp/test.dbf' offline drop;      //此处若不加drop会报错

再次查看v$datafile表会发现对应的几个dbf文件状态由ONLINE变为RECOVER

SQL> select * from v$tablespace;

SQL> drop tablespace test including contents cascade constraints;

......

删除完毕,再次执行startup成功。

ORA-01157报错"cannot identify/lock data file"解决的更多相关文章

  1. 【Oracle】ORA-01157: cannot identify/lock data file 201 - see DBWR trace file

    今天数据库在查询数据的时候显示了这个错误: ORA-01157: cannot identify/lock data file 201 - see DBWR trace file ORA-01110: ...

  2. oracle 导入报错:field in data file exceeds maximum length

    今天用sqlldr导入数据时候报错: " Record 1: Rejected - Error on table ks_test, column khname.Field in data f ...

  3. sqlldr导入报错:field in data file exceeds maximum length

    检查报错日志提示:field in data file exceeds maximum length REMARK字段设置:varchar2(2000),报错的内容也没有超1000个字符 表中定义的字 ...

  4. ORA-01157:cannot identify/lock data file 6 - see DBWR trace file ORA-01110:data file 6:'/u01/app/oracle/oradata/PRDO2/sysaux02.dbf'

  5. Viewpager+Fragment 跳转Activity报错android.os.TransactionTooLargeException: data parcel size xxxxx bytes

    Viewpager + Fragment 跳转Activity报错android.os.TransactionTooLargeException: data parcel size xxxxx byt ...

  6. 发布后台接口报错:could not load file or assembly 'mysql.data,' version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d

    本地调试正常,但是服务器上面一直报错:could not load file or assembly 'mysql.data,' version=6.7.4.0, Culture=neutral, P ...

  7. scp报错:not a regular file,解决方法:加参数 -r

    命令:scp  -P1234  /data/aa   root@192.0.0..0:/data 文件结构:/data/aa/yearmonth=2015-09 报错:not a regular fi ...

  8. Oracle 12c报错:ORA-01078和LRM-00109的解决办法

    Oracle 12c报错:ORA-01078和LRM-00109的解决办法 2017-12-17 10:25:30 lemon_love1 阅读数 4336  收藏 更多 分类专栏: oracle   ...

  9. mysql中大数据表alter增加字段报错:"1034 Incorrect key file for table 'table_name'; try to repair it"

    mysql中大数据表alter增加字段报错:"1034 Incorrect key file for table 'table_name'; try to repair it" 现 ...

随机推荐

  1. javascript第十四课,方法的扩展prototype

    所谓扩展方法就是,在原函数的基础上我们往对象里面添加一些自己需要的方法,例如: string对象 string.prototype.checkEmail=function(){ //方法体 //在这里 ...

  2. MYSQL报Fatal error encountered during command execution.错误的解决方法

    {MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command executio ...

  3. Hexo 官方主题 landscape-plus 优化

    博主喜欢简洁大方的Hexo主题,看了不下100个主题之后,最终选择了 landscape-plus 主题(针对中国大陆地区,对Hexo官方主题landscape进行优化后的版本).更多Hexo主题资源 ...

  4. 一点用JS写控制权限的心得

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  5. powerdesigner 转换各种数据库SQL

    转各种SQL脚本的步骤 一.

  6. [Linked List]Remove Nth Node From End of List

    Total Accepted: 84303 Total Submissions: 302714 Difficulty: Easy Given a linked list, remove the nth ...

  7. WCF 启用multipleSiteBindingsEnabled 情况下报终结点地址错误

    报错信息如下: Server Error in '/MyWcfService' Application. When 'system.serviceModel/serviceHostingEnviron ...

  8. SQL Server 查看对象之间的引用关系

    前期准备: use studioA;           go create table T(X int,Y int); insert into T(X,Y) values(1,1),(2,2);  ...

  9. 实现水电气一卡通 IC卡扇区分配

    现在市面上我们接触到的IC卡大部分都是分为16个扇区,分别标注为0-15区.而实现一卡通的秘密就在这16个扇区之中,一个,或者一类功能用途读取这一个扇区,除了一般默认0扇区不用外,其他扇区可以被分别加 ...

  10. C++ dynamic_cast实现原理

    dynamic_cast是一个操作符,其用法不再赘述.查看汇编码可以发现实际调用的是这个函数__RTDynamicCast,其内部实现如下: rtti.h: #pragma once extern & ...