Re: ERROR ORA-12154 TNS: could not resolve the connect identifier specified
Date: Thu, 16 Oct 2008 20:39:11 -0700 (PDT)
On Oct 16, 4:48 pm, joel garry <joel-ga..._at_home.com> wrote:
> On Oct 16, 2:36 pm, beta <qlng2..._at_gmail.com> wrote:
> > On Oct 16, 11:31 am, Frank van Bortel <frank.van.bor..._at_gmail.com>
> > wrote:
> > > beta wrote:
> > > > I am a developer consultant ! it is a serious issue for me.
> > > > The error message (ORA-12154: TNS:could not resolve the connect
> > > > identifier specified) like the environment is not correct setup for a
> > > > web. What I've done was create a new startup web sript
> > > > *****************************
> > > > #/bin/sh
> > > > export ORACLE_BASE=/opt/app/oracle
> > > > export ORACLE_HOME=/opt/app/oracle/product/11.1.0/db_1
> > > > export ORACLE_SID=demo
> > > > export LD_LIBRARY_PATH=/opt/app/oracle/product/11.1.0/db_1/lib
> > > > export TNS_ADMIN=/opt/app/oracle/product/11.1.0/db_1/network/admin
> > > Odd... you tnsping uses
> > > /u01/app/oracle/product/11.1.0/db_1/network/admin/
> > > --
> > > Regards,
> > > Frank van Bortel
> > Hi Frank,
> > Here is tnsping output
> > ### tnsping demo
> > TNS Ping Utility for Linux: Version 126.96.36.199.0 - Production on 16-
> > OCT-2008 14:28:29
> > Copyright (c) 1997, 2007, Oracle. All rights reserved.
> > Used parameter files:
> > /u01/app/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora
> > Used TNSNAMES adapter to resolve the alias
> > Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST
> > = xxx.xxx.xxx.13)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)
> > (SERVICE_NAME = DEMO)))
> > OK (0 msec)
> > Does something worng with my tns location or else?
> > Everything works fine with me, if I change y program like
> > <?php
> > $dbsrt="(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST =www.www.com)(PORT=1521))(CONNECT_DATA =(SERVER = DEDICATED)
> > (SERVICE_NAME = demo)))";
> > $connection = oci_connect("hr", "hr",$dbsrt);
> > ....
> > ...
> > ?>
> > I like to replace the "$dbsrt" with 'demo" in oci_connect() function.
> > Do you see what a problem on my tnsnames.ora?
> > Thanks much,
> Try lower case demo in the tnsnames.ora, try double quotes in the
> login where you have single quotes.
> A wild guess, but it has been known to be a problem in some
> What does lsnrctl status say? Maybe you have to add something to the
> login string like
> Could there be a problem with the web environment not knowing about
> the tnsnames.ora?
> @home.com is bogus.
> Sorry Sybrand, Oracle indeed now sells crystal balls:http://oraclestore.oracle.com/OA_HTML/ibeCCtpSctDspRte.jsp?section=13...
Thanks, I will try it. Received on Thu Oct 16 2008 - 22:39:11 CDT