Re: ERROR ORA-12154 TNS: could not resolve the connect identifier specified
Date: Thu, 16 Oct 2008 14:36:56 -0700 (PDT)
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
> Frank van Bortel
Here is tnsping output
### tnsping demo
TNS Ping Utility for Linux: Version 22.214.171.124.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
$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, Received on Thu Oct 16 2008 - 16:36:56 CDT