0

I want to connect oracle db by perl with LDAP, but I got below issue:

No such database (dbase123456)! at /home/cy/scripts/test/lib/DBD/LDAP.pm line 401, line 253. DBI connect('dbase123456','cy',...) failed: No such database (dbase123456)! at ./test.pl line 28 Can't call method "prepare" on an undefined value at ./test.pl line 29, line 253.

The perl scripst are:

my $query = GetQuery();

my $dbh = DBI->connect("DBI:LDAP:dbase123456",'cy','cy');

my $sth = $dbh->prepare($query);

$sth->execute();

my $rows_ = $sth->fetchall_arrayref();

$sth->finish();

Please someone help me to check the root cause, thanks a lot.

1
  • Are you sure that you are using correct db name? Because it clearly giving the Database not found error. Commented May 15, 2017 at 6:05

1 Answer 1

0

At a guess, you haven't created the configuration file dbase123456.ldb

Take a look at GETTING STARTED from the documentation for the DBD::LDAP driver

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.