RE: ORA-12154: TNS:could not resolve the connect identifier specified



Here is what I did:

eval {
$dbh = DBI->connect("dbi:$dbDriver:$dbName", $dbUser, $dbPass,
{ RaiseError => 1, PrintError => 1,
ora_envhp => 0 });
};

Still does not work.

Peter

-----Original Message-----
From: Alexander V Alekseev [mailto:alex@xxxxxxxxxx]
Sent: Wednesday, December 12, 2007 3:21 PM
To: Loo, Peter # PHX
Cc: dbi-users@xxxxxxxx
Subject: RE: ORA-12154: TNS:could not resolve the connect identifier
specified

Hello!



On Wed, 12 Dec 2007, Loo, Peter # PHX wrote:


Hi Martin,

I tried setting both variables at the very beginning before any
connection is made and the result is still the same.

$ENV{ora_envhp} = 0;
$ENV{ORA_ENVHP} = 0;

ora_envhp is one of "Connect Attributes" (as stated in perldoc
DBD::Oracle). Therefore it must be passed to DBI->connect() call like
this:

my $dbh = DBI->connect($dsn, $user, $password,
{ RaiseError => 0, AutoCommit => 0, ora_envhp=> 0 });


Bye. Alex.


This E-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply E-mail, and
destroy all copies of the original message.
.



Relevant Pages

  • RE: Where are the selected rows stored using fetchall_arrayref
    ... Peter Loo ... This E-mail message is for the sole use of the intended recipient ... unauthorized review, use, disclosure or distribution is prohibited. ... you are not the intended recipient, please contact the sender by reply ...
    (perl.dbi.users)
  • Re: AIX 5.3 disaster recovery fro AIX newbie
    ... fro AIX newbie ... errors or omissions in this e-mail message. ... not the intended recipient or the individual responsible for delivering ... e-mail do not reflect the views of Blue Cross Blue Shield of Florida, ...
    (AIX-L)
  • RE: DBI->data_sources(Oracle)
    ... As far as I understand DBD::Oracle, ... This E-mail message is for the sole use of the intended recipient ... you are not the intended recipient, please contact the sender by reply ...
    (perl.dbi.users)
  • Re: AIX 5.3 disaster recovery fro AIX newbie
    ... Can I get into maint mode from hard drive or I will need an alternate ... omissions in this e-mail message. ... e-mail do not reflect the views of Blue Cross Blue Shield of Florida, ... intended recipient or the individual responsible for delivering to the ...
    (AIX-L)
  • SUMMARY: samba translate dos to unix files
    ... Running Samba 2.2.2 on Solaris 8. ... The information contained in this e-mail message is intended ... intended recipient, you should be aware that any ... Information Systems by the MessageLabs. ...
    (SunManagers)