Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Perl DBI-Oracle8(Linux) connection problems
Hi,
I am having some problems connecting to Oracle8 -- any input is appreciated!! I'm using DBD::Oracle to connect to Oracle8 running Linux (via TCP/IP). I think the problem lies in how I have the TNS configured, but I'm not sure. I have included symptoms below, so this is a little long.
If I used DBI to connect to my database, and I *don't* specify a name, it works perfectly. The following works just fine:
$conn = DBI->connect('dbi:Oracle:', $user, $password, 'Oracle',
{ RaiseError => 1, AutoCommit => 0} );
Also, sqlplus user/password (without a name specified) works fine.
However, if I try to specify a name (and I have tried all the connection
strings suggested in the perldoc DBD::Oracle documentation), my perl program
croaks. I've looked at my names.ora and tnsnames.ora files, and they look
like the ones suggested in the online documentation, but here they are
anyhow: ------- names.ora ------------- mydb = (description = (address_list
= (address = (protocol = tcp) (host = testdb.xxx.com) (port = 1521) ) )
(connect_data = (sid = mydb) ) ) ------- tnsnames.ora ------------
(autogenerated by the install) # # Installation Generated Net8 Configuration
# Version Date: Oct-27-97 # Filename: Tnsnames.ora # extproc_connection_data
= (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = mydb)) (CONNECT_DATA =
(SID = extproc)) )
mydb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host= testdb.xxx.com)(Port= 1521))
(CONNECT_DATA = (SID = mydb))
)
mydb_BEQ =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = BEQ)(PROGRAM = /u01/app/oracle/product/8.0.5) (argv0 = oraclemydb) (args = '(DESCRIPTION = (LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))') --------------------
If I do a namesctl status, I get the following warnings:
NNL-00018: warning: could not contact default name server NNL-00005: no server has been set. Use the "SET SERVER" command first
However, whenever I try to set the server, I get a message saying that no such server exists. If I do a tnsping using the db name, I get a "failed to resolve name" warning and it doesn't work. (This is all being done on the server machine, not remotely.)
Running lsnctrl services produces the following output:
LSNRCTL for Linux: Version 8.0.5.0.0 - Production on 06-JAN-99 13:46:22
(c) Copyright 1997 Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=mydb))
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
Linux Error: 13: Permission denied
Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=PNPKEY))
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
Linux Error: 13: Permission denied
Connecting to (ADDRESS=(PROTOCOL=TCP)(Host=testdb.xxx.com)(Port=1521))
Services Summary...
extproc has 1 service handler(s)
DEDICATED SERVER established:0 refused:0
LOCAL SERVER orac has 1 service handler(s) DEDICATED SERVER established:16 refused:0 LOCAL SERVER
Any ideas?
Thanks!
Catherine Tornabene
tornabene_at_my-dejanews.com
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Jan 06 1999 - 16:02:49 CST
![]() |
![]() |