一个测试环境,由于主机工程师更换存储,在没有停数据库的情况下关闭操作系统,导致启动数据库时报ORA-
01157
: cannot identify/lock data file %s - see DBWR trace file错误。
从alert日志中,我们可以看到 /ora10g/test/test.dbf文件存在权限问题
Mon Nov 26 17:41:47 2012
Errors in file /ora10g/admin/ora10g/bdump/ora10g_dbw0_7427.trc:
ORA- 01157 : cannot identify/lock data file 6 - see DBWR trace file
ORA- 01110 : data file 6: '/ora10g/test/test.dbf'
ORA- 27037 : unable to obtain file status
HP-UX Error: 13: Permission denied
Additional information: 3
ORA-1157 signalled during: ALTER DATABASE OPEN...
检查日志发现,datafile 6 '/ora10g/test/test.dbf' 存在问题,进一步检查
lrwxr-x--- 1 root sys 7 Nov 23 16:38 test -> testbdf
-rw-r----- 1 root sys 2105344 Nov 23 16:38 test.dbf
-rwxr-x--- 1 root sys 160 Nov 23 16:38 test.sh
drwxr-x--- 2 root sys 96 Nov 23 16:38 testbdf
发现,testbdf 目录,ora10g用户没有读写权限,所以删除该文件,这个问题可以解决。
从alert日志中,我们可以看到 /ora10g/test/test.dbf文件存在权限问题
Mon Nov 26 17:41:47 2012
Errors in file /ora10g/admin/ora10g/bdump/ora10g_dbw0_7427.trc:
ORA- 01157 : cannot identify/lock data file 6 - see DBWR trace file
ORA- 01110 : data file 6: '/ora10g/test/test.dbf'
ORA- 27037 : unable to obtain file status
HP-UX Error: 13: Permission denied
Additional information: 3
ORA-1157 signalled during: ALTER DATABASE OPEN...
检查日志发现,datafile 6 '/ora10g/test/test.dbf' 存在问题,进一步检查
lrwxr-x--- 1 root sys 7 Nov 23 16:38 test -> testbdf
-rw-r----- 1 root sys 2105344 Nov 23 16:38 test.dbf
-rwxr-x--- 1 root sys 160 Nov 23 16:38 test.sh
drwxr-x--- 2 root sys 96 Nov 23 16:38 testbdf
发现,testbdf 目录,ora10g用户没有读写权限,所以删除该文件,这个问题可以解决。