1、 异常现象
数据库查询异常,报错信息如下,
SQL> select file_name,status,online_status from dba_data_files where file_id=238;
select file_name,status,online_status from dba_data_files where file_id=238
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 238 - see DBWR trace file
ORA-01110: data file 238: '/dev/vx/rdsk/ht/ht_data8_34'
结点1:
数据库查询正常,
SQL> select file_name,status,online_status from dba_data_files where file_id=238;
FILE_NAME STATUS ONLINE
------------------------------------ - -------------- ----------------
/dev/vx/rdsk/ht/ht_data8_34 AVAILABLE ONLINE
2 、环境介绍
共享存储管理: veritas storage foundation(以下简称veritas)
数据库版本: Oracle 10.2.0.5 2结点rac
?
3 、异常处理
点击(此处)折叠或打开
-
[oracle@htapp1 ~]$ oerr ora 1157
-
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.
crw------- 1 root system 48,51277 Apr 15 19:19 ht_data8_34(异常磁盘权限)
查询结点1磁盘状态:
crw-rw---- 1 oracle oinstall 48,51281 Apr 15 19:19 ht_data8_34(正常磁盘权限)
发现结点2磁盘权限异常,造成数据库无法正常访问该数据文件。
使用veritas集群命令修改磁盘权限
vxedit -g vght set user=oracle group=oinstall mode=660 ht_data8_34
说明: vght裸设备所在卷组,ht_data8_34裸设备名称
重新识别并验证数据文件
SQL> alter system check datafiles;
System altered.
再次检查该数据文件可用性:
SQL> select file_name,status,online_status from dba_data_files where file_id=238;
FILE_NAME STATUS ONLINE
------------------------------------ - -------------- ----------------
/dev/vx/rdsk/ht/ht_data8_34 AVAILABLE ONLINE
数据文件恢复正常。
4 、问题分析
vxedit -g vght set user=oracle group=oinstall mode=660 ht_data8_34
5 、优化建议
2、 规范veritas操作,统一使用veritas命令修改设备权限,杜绝该问题再次出现。