現象:連接數據庫出錯:Error while trying to retrieve text for error ORA-32101
背景:程序如果在安裝目錄或加絕對路徑執行沒有任何問題
問題:如果讓此程序在crontab中定時執行?
首次使用crontab執行腳本調用c++程序,直接編輯:
發現程序一直報上面的錯誤ORA-32101。
腳本內容:
測試好久,找好多方法,就是不行,最後
在腳本中加一行:
. $HOME/.profile
搞定。
附:
ORA-32101: |
cannot create OCI Environment |
Cause: | An OCI Environment could not be created for OCCI |
Action: | Insure that the parameters to the creatEnvironment method are valid |
參考資料:
http://forums.oracle.com/forums/thread.jspa?threadID=521125