Reputation: 71
I will be needing to connect to an Oracle server on a system that only supports LDAP for name lookup, rather than TNSNAMES.ora. Is this possible with 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.
Upvotes: 0
Views: 985
Reputation: 5838
Sounds like you are trying to connect to Oracle Internet Directory (OID) which is an LDAP implementation... not an Oracle database directly. Correct?
If so, Net::LDAP all the way via 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.";
Upvotes: 2
Reputation: 6317
It should use whatever is defined in the sqlnet.ora of the client install. Perl shouldn't have to worry about the naming method.
Upvotes: 0