因环境变量不正确报ORA-32101

来源:互联网 发布:telnet linux 命令 编辑:程序博客网 时间:2024/05/17 00:33

现象:连接数据库出错:Error while trying to retrieve text for error ORA-32101

背景:程序如果在安装目录或加绝对路径执行没有任何问题

问题:如果让此程序在crontab中定时执行?

首次使用crontab执行脚本调用c++程序,直接编辑:

发现程序一直报上面的错误ORA-32101。

脚本内容:

测试好久,找好多方法,就是不行,最后

在脚本中加一行:

. $HOME/.profile

搞定。

附:

ORA-32101:

cannot create OCI EnvironmentCause: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

 

原创粉丝点击