Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Unable to connect to Oracle 19c

by bliako (Monsignor)
on Nov 24, 2021 at 09:10 UTC ( #11139073=note: print w/replies, xml ) Need Help??

in reply to Unable to connect to Oracle 19c

note that your $dsn is not used in your DBI->connect() which hardcodes the dsn.

Check if DBD::Oracle is installed under a path included in @INC. In Linux I use App::whichpm to locate modules from the command prompt, like: whichpm DBD::Oracle . In order to see Perl's @INC I do this from command prompt: perl -e "print \"@INC\"" (I guess that works in windows with lame quoting rules). Simply check if the starting path of the first command matches an entry in the output of the second.

Finally, as you said and other Monks said and the program diagnosed: Perhaps the capitalisation of DBD 'oracle' isn't right. And also the documentation of DBD::Oracle has this example (and that should have been your first call actually!):

use DBI; $dbh = DBI->connect("dbi:Oracle:$dbname", $user, $passwd);

Also note that more than one reasons for failure may apply.

bw, bliako

Replies are listed 'Best First'.
Re^2: Unable to connect to Oracle 19c
by NERDVANA (Friar) on Nov 25, 2021 at 07:40 UTC
    You can get the App::whichpm behavior from perldoc as well, with -l

    See also, perldoc -m for jumping straight into the code of a module.

Re^2: Unable to connect to Oracle 19c
by SpaceCowboy (Acolyte) on Nov 24, 2021 at 17:02 UTC
    Thank you @bliako, turns out that it needed my SID. Which was never the case with MySQL when I tested with it.

    It is working now. Sorry for posting somewhat trivial question...

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139073]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2022-08-11 06:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found