startup 資料庫時報出ORA-01157、ORA-01110的錯誤

hq181msn發表於2008-03-26

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部落格 ” ,連結:http://blog.itpub.net/216109/viewspace-1001509/,如需轉載,請註明出處,否則將追究法律責任。

相關文章