OCIError on'require';权限问题? [英] OCIError on 'require'; permissions issue?
问题描述
我最近刚刚开始在工作中学习/使用Ruby.我有一个非常简单的测试脚本,该脚本仅连接到我们的Oracle 10g数据库,运行一个select,并将结果放入"屏幕.这是在Solaris 10服务器上.如果我以"apps"用户(运行我们的自动化脚本的系统用户)身份运行脚本,则脚本会正常运行.如果我自己运行,则会抛出错误:
I've just recently started learning/using Ruby at work. I've got a super-simple test script that just connects to our Oracle 10g database, runs a select, and 'puts' the results to the screen. This is on a Solaris 10 server. If I run the script as the 'apps' user (the system user that runs our automated scripts), the script runs fines. If I run it as myself, it throws an error:
oci8lib.c:98:in oci8lib.so: OCI Library Initialization Error (OCIError)
from /usr/local/lib/ruby/site_ruby/1.8/oci8.rb:25
from ./dbTest.rb:3:in `require'
from ./dbTest.rb:3
我的环境变量与应用程序"用户的匹配.我假设这是某些文件/目录或其他文件上的权限问题,但我不知道从哪里开始寻找. oci8.rb文件中的第25行是"require'oci8lib_18'"指令.我已经对oci8lib_18.so文件和指向该目录的目录具有读取和执行权限,但是我不知道它需要访问哪些目录.
My env vars match the 'apps' user's. I'm assuming this is a permissions issue on some file/directory or other but I don't know where to start looking. Line 25 in the oci8.rb file is a "require 'oci8lib_18'" directive. I have read and execute permissions on the oci8lib_18.so file and the dirs leading to it, but I don't know which dirs it needs to access.
有人对我应该检查哪些文件/目录有任何建议吗?或对这个问题可能有其他想法?
Does anyone have any suggestions on what files/dirs I should check the permissions on? Or any other thoughts on what the issue may be?
更新我一直在与支持OCI8的家伙发送电子邮件,结果发现几个Oracle目录具有阻止我的登录信息访问所需信息的权限.一个简单的测试是尝试运行sqlplus,该操作也失败了.
UPDATE I've been emailing with the guy that supports OCI8 and it turns out that several of the Oracle directories have permissions that prevent my login from accessing needed info. A simple test was to try to run sqlplus, which also failed.
戴夫
推荐答案
我一直在与支持OCI8的家伙发送电子邮件,事实证明,其中一些Oracle目录具有阻止我的登录信息访问所需信息的权限.一个简单的测试是尝试运行sqlplus,该操作也失败了.
I've been emailing with the guy that supports OCI8 and it turns out that several of the Oracle directories have permissions that prevent my login from accessing needed info. A simple test was to try to run sqlplus, which also failed.
这篇关于OCIError on'require';权限问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!