Re: oracle error ORA-12154

From: Date: Fri, 16 Jul 2004 19:58:42 +0000
Subject: Re: oracle error ORA-12154
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-35312@lists.php.net to get a copy of this message
yeah I got it to work, i had to do putenv() with my oracle home dir and then my scripts started working. thanks Peter Beckman wrote:
The biggest problem with oci8 is having these four variables set: $ORACLE_SID=SOMESID $ORACLE_HOME=/home/beckman/oracle $ORACLE_BASE=/home/beckman/oracle $TNS_ADMIN=/home/beckman/oracle/network/admin If those aren't set, then things won't work. Please confirm that those environment variables are set in Apache or whatever web server you are using. If they aren't, oci8 won't work. Beckman On Fri, 16 Jul 2004, Adam Williams wrote:
Hi, I'm trying to connect to an oracle 9.20 database using: $conn = OCILOGON("dah50","dah50","zed2.aleph0"); but I get the error ORA-12154 Searching on google says my listener.ora or tnsnames.ora may have problems, but I think mine are correct. Can someone take a look and see if they are ok? Also, I can connect to the database from the command line: ORACLE>>sqlplus dah50/dah50@zed2.aleph0 SQL*Plus: Release 9.2.0.3.0 - Production on Fri Jul 16 11:58:49 2004 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to: Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.3.0 - Production so I'm not really sure what is going on. below are my tnsnames.ora and listener.ora: tnsnames.ora ------------ zed2.aleph0=(description=
               (address=
                       (protocol=ipc)
                       (key=aleph0))
               (address=
                       (protocol=tcp)
                       (host=zed2.mdah.state.ms.us)
                       (port=1521))
               (connect_data=(service_name=aleph0)(server=DEDICATED)))
listener.ora ------------ listener=(description=
               (address_list=
                       (address =
                               (protocol = ipc)
                               (key = extproc))
                       (address=
                               (protocol=ipc)
                               (key=aleph0))
                       (address=
                               (protocol=tcp)
                               (host=zed2.mdah.state.ms.us)
                               (port=1521))
               )
          )
sid_list_listener=(sid_list=
                       (sid_desc=
                               (global_name=aleph0)
                               (sid_name=aleph0)
                               (oracle_home=/exlibris/app/oracle/product/920)
                       )
                       (sid_desc =
                               (sid_name = extproc)
                               (oracle_home=/exlibris/app/oracle/product/920)
                               (program = extproc)
                       )
                 )
startup_wait_time_listener=0 connect_timeout_listener=20 trace_level_listener=off and when I start the listener I get no errors. ORACLE>>lsnrctl stop ; lsnrctl start LSNRCTL for Linux: Version 9.2.0.3.0 - Production on 16-JUL-2004 12:07:11 Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Connecting to (DESCRIPTION=(address=(protocol=ipc)(key=extproc))) The command completed successfully LSNRCTL for Linux: Version 9.2.0.3.0 - Production on 16-JUL-2004 12:07:11 Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Starting /exlibris/app/oracle/product/920/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 9.2.0.3.0 - Production System parameter file is /exlibris/app/oracle/product/920/network/admin/listener.ora Log messages written to /exlibris/app/oracle/product/920/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=aleph0))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=zed2.mdah.state.ms.us)(PORT=1521))) Connecting to (DESCRIPTION=(address=(protocol=ipc)(key=extproc))) STATUS of the LISTENER ------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 9.2.0.3.0 -
Production
Start Date                16-JUL-2004 12:07:11
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File /exlibris/app/oracle/product/920/network/admin/listener.ora Listener Log File /exlibris/app/oracle/product/920/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=aleph0))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=zed2.mdah.state.ms.us)(PORT=1521))) Services Summary... Service "aleph0" has 1 instance(s). Instance "aleph0", status UNKNOWN, has 1 handler(s) for this service... Service "extproc" has 1 instance(s). Instance "extproc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
beckman@purplecow.com                             http://www.purplecow.com/
---------------------------------------------------------------------------


« previous php.db (#35312) next »