startup 数据库时报出ORA-01157、ORA-01110的错误及处理过程
[@more@]SQL> startup
ORACLE instance started.
Total System Global Area 268435456 bytes
Fixed Size 1218920 bytes
Variable Size 113247896 bytes
Database Buffers 146800640 bytes
Redo Buffers 7168000 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
ORA-01110: data file 7: '/opt/oracle/emcdata/recovery_oa/oadata03.dbf'
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.
01110, 00000, "data file %s: '%s'"
// *Cause: Reporting file name for details of another error
// *Action: See associated error message
检查发现出现该问题是由于一部分文件的所属被改动过造成启动时不能直接加载数据文件,后来经过重新对该文件夹授权,重启startup正常
[root@ractest shundeOAdomain]# chgrp oradba /opt/oracle/emcdata/recovery_oa
[root@ractest shundeOAdomain]# chown -R ora10g:oradba /opt/oracle/emcdata/recovery_oa
[root@ractest shundeOAdomain]# chown -R ora10g:oradba /opt/oracle/emcdata/recovery_oa/*
[root@ractest shundeOAdomain]# ls -lt /opt/oracle/emcdata/recovery_oa
总用量 30750188
-rw-r----- 1 ora10g oradba 2097160192 3月 20 12:48 oadata01.dbf
-rw-r----- 1 ora10g oradba 2097160192 3月 20 12:48 oadata02.dbf
-rw-r----- 1 ora10g oradba 2097160192 3月 20 12:48 oadata03.dbf
------------------------------------------------------
Database mounted.
ORA-01113: file 20 needs media recovery
ORA-01110: data file 20: '/opt/ora10g/oradata/ORA10G/datafile/hqtest01.dbf'
SQL> alter database datafile '/opt/ora10g/oradata/ORA10G/datafile/hqtest01.dbf' offline drop;
Database altered.
SQL> alter database open;
Database altered
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/216109/viewspace-1001509/ ,如需转载,请注明出处,否则将追究法律责任。