[英]How to connect to Oracle with Perl using LDAP?
I will be needing to connect to an Oracle server on a system that only supports LDAP for name lookup, rather than TNSNAMES.ora. 我将需要连接到仅支持LDAP进行名称查找的系统上的Oracle服务器,而不是TNSNAMES.ora。 Is this possible with perl?
perl有可能吗? I am quite sure that I can install the Net::LDAP module and parse the connection information myself, but I was looking for a standard way.
我很确定我可以安装Net :: LDAP模块并自己解析连接信息,但我一直在寻找标准方法。
Sounds like you are trying to connect to Oracle Internet Directory (OID) which is an LDAP implementation... not an Oracle database directly. 听起来您正在尝试连接到Oracle Internet Directory(OID),这是一个LDAP实现...而不是直接连接到Oracle数据库。 Correct?
正确?
If so, Net::LDAP all the way via Perl... 如果是这样,Net :: LDAP始终通过Perl ...
my $LSERV = 'yourldaphost.yourdomain.com';
my $BASE_DN = 'cn=*,dc=*,dc=*'; # these * values must be filled in correctly for your LDAP
my $timeout = 10; # How long to wait (in secs).
my $success; my $message;
my $ldap = Net::LDAP->new(
$LSERV,
timeout => $timeout
) or die "! Unable to connect to OID LDAP.";
It should use whatever is defined in the sqlnet.ora of the client install. 它应该使用客户端安装的sqlnet.ora中定义的任何内容。 Perl shouldn't have to worry about the naming method.
Perl不必担心命名方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.