ora-00604錯誤解決
今天早上一到公司,就遇到這個問題。剛開始沒有頭緒,搞的一頭霧水,最後在經過itpub上yueyangflash的指點,問題終於解決。
一、故障現象
1. 10.87.56.221伺服器裝的是oracle 9i的客戶端。連線資料庫的時候報錯:
SQL> conn test/test@test
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-02248: invalid option for ALTER SESSION
而其他客戶端連線同樣的庫,就沒有問題。
如果用SYS使用者連,就報說連到空閒例項,而不報00604錯誤。
二、問題分析
1. 懷疑是glogin.sql檔案被修改,或者環境變數設定出問題。
2. 在metalink上解釋說:
Applies to:
Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.4
This problem can occur on any platform.
Symptoms
On certain Windows client :
connection using sqlplus giving the following error :
ORA-00604: error occurred at recursive SQL level 1
ORA-02248: invalid option for ALTER SESSION
Cause
environment variable NLS_* was set between two quotas .
For example :
NLS_DATE_FORMAT= 'YYYY/MM/DD' this should be YYYY/MM/DD
D:\oracle\product\10.2.0\db_1\BIN>set NLS_DATE_FORMAT= 'YYYY/MM/DD'
D:\oracle\product\10.2.0\db_1\BIN>sqlplus system/sys
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Sep 23 13:17:12 2008
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-02248: invalid option for ALTER SESSION
Solution
set the environment variable without any quotas
三、解決問題
1. 檢查客戶端的壞境變數,發現NLS_DATE_FORMAT變數確實設定的有問題。變數值中間多了個冒號“:”
NLS_DATE_FORMAT=YYYY/MM/DD:HH24:MI:SS。
2. 改變設定
去掉冒號,問題解決。變數NLS_DATE_FORMAT的值不能加引號或其他東西,直接為: YYYY/MM/DD HH24:MI:SS即可。
四、 總結
1. 原因是有個同事覺得查詢時間欄位時,每次都需要新增to_data()函式,所以想透過設定環境變數來省事,沒想到變數沒設對,還引起了一個小小的故障。
2. 客戶端新增NLS_DATE_FORMAT變數查詢時間欄位時確實很方便,不過所有涉及到oracle資料庫的變數,一定要小心,否則可能造成很嚴重的後果。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/751371/viewspace-617144/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 解決:ora-00604, orac-00942錯誤
- ORA-00604 ORA-21700錯誤處理
- VIM 常用錯誤解決
- sqldeveloper for windows 錯誤解決SQLDeveloperWindows
- vsftpd 錯誤:530 and 500 錯誤解決方法FTP
- ORA-00604 01654 06512錯誤處理
- standby上增加tempfile報錯ORA-00604,ORA-16000解決方法
- 華納雲:資料庫出現ORA-00604報錯怎麼解決資料庫
- latex 錯誤以及解決方案
- ora-27504錯誤解決
- Datastore error in 'dirbdb'錯誤解決ASTError
- ORA-27054 錯誤解決
- mysql與php錯誤解決MySqlPHP
- mysql錯誤解決總結MySql
- 【故障解決】OGG-00446 錯誤解決
- dbfread報錯ValueError錯誤解決方法Error
- 【故障解決】ORA-06502錯誤解決
- HTTP 錯誤 500.19- Internal Server Error 錯誤解決方法HTTPServerError
- dns錯誤怎麼辦 dns錯誤的解決辦法DNS
- HTTP代理錯誤怎麼解決?HTTP
- undefined reference to錯誤的解決方法Undefined
- SAXParseException的錯誤解決之二Exception
- PHP curl error 60 錯誤解決PHPError
- ORA-04091錯誤解決
- ORA-3136 錯誤解決 .
- [Windows] 解決 COM Surrogate 錯誤提示Windows
- AFNetworkingErrorDomain 錯誤解決方法ErrorAI
- [Flashback]ORA-38760錯誤解決
- EXP-00091錯誤解決
- virtualbox 錯誤解決記錄
- INS-40904 錯誤解決
- Mac下面svn錯誤資訊解決Mac
- PHP錯誤“Thisfilehasexpired”的解決方法PHP
- SAP錯誤提示解決辦法
- ClamAV無法更新錯誤解決
- clamd socket找不到錯誤解決
- steam磁碟寫入錯誤怎麼解決 steam磁碟寫入錯誤解決方法大全
- 解決MySQL server has gone away錯誤的解決方案MySqlServerGo