DBI/DBD/Oracle connect won't work (ORA-12154) 
Author Message
 DBI/DBD/Oracle connect won't work (ORA-12154)

Hi,

I'm new to this so I'm sorry if this has been answered X times before.

We have ORacle *i here.
We installed DBI and DBD.

I tried to connect to Oracle and keep on getting ORA-12154

Here is the line I am using...

========
$dbh = DBI->connect( 'DBI:Oracle:olsora1', 'webservr', 'oraclepass$$') || die "
CANNOT OPEN DB\n";
========

Now my enrironment might be wrong, but I think the tnsnames.ora file is missing
something.  Could someone perhaps cut-n-paste relevant parts from their
tnsnames.ora file?

Anyway, here is what I get everytime I run this...
======
DBI->connect failed: ORA-12154: TNS:could not resolve service name (DBD ERROR:
OCIServerAttach) at pete.pl line 9
CANNOT OPEN DB
======
I'm a novice at this so anything might be wrong.
Any pointers? Please?

Thanks much, and sorry if this should've been somewhere else.

Pete



Sun, 26 May 2002 03:00:00 GMT  
 DBI/DBD/Oracle connect won't work (ORA-12154)

Quote:

> Now my enrironment might be wrong, but I think the tnsnames.ora file
> is missing something.  Could someone perhaps cut-n-paste relevant
> parts from their tnsnames.ora file?

Sure

DIAL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL= TCP)(Host= <fqdn of host>)(Port= 1521))
    (CONNECT_DATA = (SID = DIAL))
  )

and make sure the listener is running and configured correctly,
and some other things I probably am forgetting.

Quote:
> Thanks much, and sorry if this should've been somewhere else.

Asking in comp.databases.oracle.server should make it more likely that
you get good help.

Next time try searching the archives of comp.lang.perl.* on dejanews,
and you'll most likely find solutions that were posted before.

Erik



Sun, 26 May 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Perl Oracle DBD with NLS_LANG UTF8 getting errors ORA-01406 ORA-24345

2. DBD:DBI won\t connect to ODBC db when script run from web server

3. Oracle DBD/DBI on HP-UX: can't load Oracle.sl

4. DBI / DBD Oracle connect question

5. NT ORACLE PERL DBD DBI->connect format

6. NT ORACLE PERL DBD DBI->connect format

7. Help: (Win32, build 306), connect won't work with dial up (unknown error 0x00002751)

8. DBD::Oracle won't install

9. DBD-Oracle: Problems connecting to Oracle

10. ORA-00900: invalid SQL statement when using Perl DBI::Oracle module

11. can't retrieve data from Oracle DB using DBI and DBD

12. Oracle DBD/DBI on Solaris: can't resolve libclntsh.so.8.0

 

 
Powered by phpBB® Forum Software