oracle create controlfile報 ORA-01503 ORA-01565 ORA-27037

selectshen發表於2016-04-27
如果一個很常規的操作報錯找不到原因,並且在mos中搜尋不到,那很可能就是犯了低階錯誤,呵,下面就是.

在重建控制檔案
CREATE CONTROLFILE REUSE DATABASE "DBTEST" NORESETLOGS  ARCHIVELOG
...
時報以下錯誤:
ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file '/data/u02/oradata/dbtest/system01.dbf'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

這個報錯的資訊告訴你,create controlfile的時候要去讀資料檔案的資訊,而此時如果資料檔案不存在,或不可訪問就會報這個錯.
剛開始不確定create controlfile時會去讀資料檔案資訊,所以懷疑是報錯資訊不準確,一直以為是create controlfile語句的語法錯誤.

最後查create controlfile的說明,看到
DATAFILE Clause
Specify the data files of the database. You must list all data files. These files must all exist, although they may be restored backups that require media recovery.
Do not include in the DATAFILE clause any data files in read-only tablespaces. You can add these types of files to the database later. Also, do not include in this clause any temporary data files (temp files).
才發現,原來create controlfile時資料檔案就要存在了,而且是可訪問的.


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28539951/viewspace-2089459/,如需轉載,請註明出處,否則將追究法律責任。

相關文章