Re: ERROR ORA-12154 TNS: could not resolve the connect identifier specified

From: <sybrandb_at_hccnet.nl>
Date: Fri, 17 Oct 2008 00:06:34 +0200
Message-ID: <2feff4tc5s62lfl9djuspae4u0q4rqeitd@4ax.com>


On Thu, 16 Oct 2008 14:36:56 -0700 (PDT), beta <qlng2000_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 11.1.0.6.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,
>
>
>
>

Mr. Thickhead (or should I call you 'No Brain')

YOU HAVE TWO TNSNAMES.ORA FLOATING AROUND AND TWO DIFFERENT SETTINGS OF TNS_ADMIN
HERE
>> > export TNS_ADMIN=/opt/app/oracle/product/11.1.0/db_1/network/admin
AND HERE
>/u01/app/oracle/product/11.1.0/db_1/network/admin/sqlnet.ora

WHY DO YOU CONTINUE TO ANNOY THIS FORUM? SHOULD SOMEONE NUKE YOUR INSTALLATION OR BETTER NUKE YOU TO RESOLVE YOUR PROBLEM? YOU DON'T RESPOND TO ANY QUESTION. YOU KEEP ASKING WHAT IS WRONG.

IT IS Y O U!!!!!!!!!!!!!!!!!!!!!!
NOW PLEASE GET LOST!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- 
Sybrand Bakker
Senior Oracle DBA
Received on Thu Oct 16 2008 - 17:06:34 CDT

Original text of this message