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. paip.svn使用最佳实践

    paip.svn使用最佳实践 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn.net/attilax 1 ...

  2. Android UI目录

    Android UI目录 序:最近一直想进阶android应用开发,虽然对一些相关的android知识都大体熟悉,但是自己的android知识体系,经不起推敲.经不起高手的垂问.经过几个月的努力学习, ...

  3. Spark里面的任务调度:离SparkContext开始

    SparkContext这是发达国家Spark入学申请,它负责的相互作用和整个集群,它涉及到创建RDD.accumulators and broadcast variables.理解力Spark架构, ...

  4. Django学习笔记(三)—— 型号 model

    疯狂暑期学习 Django学习笔记(三)-- 型号 model 參考:<The Django Book> 第5章 1.setting.py 配置 DATABASES = { 'defaul ...

  5. 让rdlc报表在ReportViewer中水平居中的方法

    正常情况下,rdlc报表在Reportviewer中是居左显示的,如图: 在Reporviewer的属性中,我没有找到能让rdlc的居中显示的方法.网上其他人用的方法都试了,没能实现,只能自己找方法解 ...

  6. css系列教程--border和background

    css标签b:1.background:用法 background:可以指定颜色,背景,平铺效果以及背景定位.background:url(aa.png) #fff 0px 0px no-repeat ...

  7. C++中socket编程

    原文:http://blog.csdn.net/cuiran/article/details/5854794 Server端 #include <WINSOCK2.H> #include ...

  8. 9会飞的li标签

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  9. new关键字和newInstance()方法的区别

    转载:http://blog.csdn.net/iloveyin/article/details/7965183 1.类的加载方式不同    在执行Class.forName("a.clas ...

  10. mysql学习(五)-字段属性

    字段属性: unsigned: 无符号类型,只能修饰数值类型: create table if not exists t1(id int unsigned); zerofill:前端填0 //只能修饰 ...