ORA-01157: cannot identify/lock data file n 故障一例

php中文网
发布: 2016-06-07 17:22:34
原创
1816人浏览过

ORA-01157通常由后台进程DBWR锁定而产生。如果在恢复期间,如数据库已经mount,而一个或多个数据文件不能打开导致数据库不能open

最近在使用swingbench的时候碰到了ora-01157故障,下面是其具体描述与解决。

1、故障现象 
--查询视图dba_data_files时出现ORA-01157故障 
SQL> select file_name,tablespace_name from dba_data_files where tablespace_name='SOE'; 
select file_name,tablespace_name from dba_data_files where tablespace_name='SOE' 
                                      * 
ERROR at line 1: 
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file 
ORA-01110: data file 6: '/u01/Oracle/db/dbs/soe.dbf' 
 
--尝试drop tablespace 收到同样的错误 
SQL> drop tablespace soe including contents and datafiles; 
drop tablespace soe including contents and datafiles 

ERROR at line 1: 
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file 
ORA-01110: data file 6: '/u01/oracle/db/dbs/soe.dbf' 
 
2、分析 
--从错误号后的文字可判断DBWR不能识别或锁定文件号6,后面的ORA-01110给出了具体的文件位置 
--下面是错误号对应的具体描述 
SQL> ho oerr ora 01157 
01157, 00000, "cannot identify/lock data file %s - see DBWR trace file" 
// *Cause:  The background process was either unable to find one of the data 
//        files or failed to lock it because the file was already in use. 
//        The database will prohibit access to this file but other files will 
//        be unaffected. However the first instance to open the database will 
//        need to access all online data files. Accompanying error from the 
//        operating system describes why the file could not be identified. 
// *Action: Have operating system make file available to database. Then either 
//        open the database or do ALTER SYSTEM CHECK DATAFILES. 
 
--上面的描述指出了后台进程不能寻找到数据文件或者是因为文件在被其他进程使用而DBWR无法对其锁定。 
--对于象这类文件数据库将禁止对其进行访问,而其他数据文件则不受影响。 
--给出的决办法是确认错误号后的数据文件是否存在或可用,以及在open状态下执行ALTER SYSTEM CHECK DATAFILES命令   

linux

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号