Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Cannot connect using Perl::DBI (aix)
Peter Levine wrote:
>
> Using AIX 4.3 I can connect to a remote server's AIX database using
> sqlplus and can verify the connection via tnsping, but I cannot
> connect remotely using Perl::DBI::connect(). I can connect via perl if
> I am actually logged on to the remote server.
>
> tnsping output from local server to remote server:
> Attempting to contact
> (ADDRESS=(COMMUNITY=mckcommunity1.world)(PROTOCOL=TCP)(Host=eh04)(Port=1521))
> OK (10 msec)
>
> perl output from
> $dbh=DBI->connect("DBI:Oracle:$database",$user,$password)
> where
> $database="myDB" and $user="user_at_myDB"
>
> connecting: ORA-12154: TNS:could not resolve service name (DBD: login
> failed)
>
> My DBA has the listner.ora and tnsnames.ora file beneath /etc NOT
> beneath $ORACLE_HOME/network/admin so I have defined environmental
> param TNS_ADMIN as /etc.
>
> I do not see an sqlnet.ora file defined anywhere. Do I need it?
>
> Can anyone tell me why I can't connect via perl.
>
> TIA
You need to read the DBD::Oracle docs (perldoc DBD::Oracle). All the
connection infor is there.
-- Ron Reidy Oracle DBAReceived on Wed Jan 02 2002 - 18:35:08 CST
![]() |
![]() |