在一次客戶巡檢的時候發現,在WINDOWS Oracle11g RAC上執行crs_stat –t命令查詢集群狀態的時候發現異常,經過排除後,問題得到了解決。
正文:
問題分析:
當執行crs_stat –t命令,如下:
D:\app\Administrator\product\11.2.0\dbhome_1\BIN>crs_stat -t
2014-07-30 11:19:09.592:
CLSD: A file system error occured while attempting to create default permissions
for file "D:\app\11.2.0\grid\log\dhec-server-46\client\ocr_7424_3.log" during l
og open processing for process "UNKNOWN". Additional diagnostic data: LFI-00133:
正在嘗試創建已經存在的文件D:\app\11.2.0\grid\log\dhec-server-46\client\ocr_7424
_3.log。
LFI-01509: fopen() 失敗(OSD 返回值 =5)。
2014-07-30 11:19:09.595:
CLSD:An error was encountered while attempting to open log file "D:\app\11.2.0\g
rid\log\dhec-server-46\client\ocr_7424_3.log". Additional diagnostics: (:CLSD00157:)
通過上面錯誤信息:我們可以得到LFI-00133、LFI-01509錯誤,查詢相關資料得到:
LFI-01509: fopen() failed(OSD return value = string).
Cause: Call to fopen() failed.
Action: Contact Oracle Worldwide Support.
LFI-00133: Trying to create file string that already exists.
Cause: The file object was initialized with LFILOPTY_OUTPUT and without LFILOPTY_REPLACE and yet a file by this name already exists.
Action: Check to make sure that you are creating the right file. If you intend to overwrite the file if it exists that specify the replace option LFILOPTY_REPLACE when initializing the file object.
同時也發現重要的關鍵字:正在嘗試創建已經存在的文件D:\app\11.2.0\grid\log\dhec-server-46\client\ocr_7424_3.log。
當我再次執行crs_stat -t命令,如下:
D:\app\Administrator\product\11.2.0\dbhome_1\BIN>crs_stat -t
2014-07-30 11:20:51.680:
CLSD: A file system error occured while attempting to create default permissions
for file "D:\app\11.2.0\grid\log\dhec-server-46\client\ocr_7840_3.log" during l
og open processing for process "UNKNOWN". Additional diagnostic data: LFI-00133:
正在嘗試創建已經存在的文件D:\app\11.2.0\grid\log\dhec-server-46\client\ocr_7840
_3.log。
LFI-01509: fopen() 失敗(OSD 返回值 =5)。
2014-07-30 11:20:51.684:
CLSD:An error was encountered while attempting to open log file "D:\app\11.2.0\g
rid\log\dhec-server-46\client\ocr_7840_3.log". Additional diagnostics: (:CLSD001
57:)
這時我們發現:每次執行所報的錯誤文件信息是不一致的。同時也嘗試打開過D:\app\11.2.0\grid\log\dhec-server-46\client\路徑查詢該文件(ocr_7840_3、ocr_7424_3)是否存在?答案是不存在的。
問題解決:
在D:\app\11.2.0\grid\log\dhec-server-46\client\的client文件夾上添加和賦予該執行用戶修改權限。
賦予權限後再執行crs_stat –t,結果不再出現以上錯誤。
總結:在windows oracle11g RAC下當用戶執行crs_stat的時候,oracle會在D:\app\11.2.0\grid\log\dhec-server-46\client\路徑下創建日志來記錄,當無法創建寫入到該路徑的時候就會報以上的錯誤。該錯誤不影響集群正常運行,但無法記錄執行的過程。