TNS:could not resovle the service name
Please tell me how to change tranname file for this problem.
my computer name is ufone-3w2dwilbu
my globle database name is orcl.world
my sid name is orcl
database is on single computer.
Thanks in Advance.
Hi Usman,
It looks u have to give a right version of net service name.the tnsnames.ora file entry should look some thing similar to
orcl =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <user IP>)(PORT = <port as given in listener.ora>))
(CONNECT_DATA =
(SERVICE_NAME = orcl )
Check for the following before u test.
1. See whether listener is running .lsnrctl status.
2. Port in which oracle listener is running,have this propagated to tnsnames.ora.
3. default_domain value in sqlnet.ora file at client side.
4. tnsping to the net service name created , should return ok
If ur trying to connect to database from database server box,none of the above steps r required,since it uses bequeate protocol.
gook luck
M S Madan Kumar
I think this will do.
Similar Messages
-
ORA-12154 TNS Could not resolve the service name
I am working on Oracle 9i(Release 2) windows version. I want to change the value of
shared pool size, buffer size and others database parameter through "Enterprise Manager Console" but
when i connect to sysdba mode message comes "ORA-12154 TNS Could not resolve the service name".
How can I solve this problem?these problem are you getting from OEM?
post
lsnrctl status
lsnrctl services
make sure database is running.. all the services running in services.msc
check error code and start..
ORA-12514:
TNS:listener does not currently know of service requested in connect descriptor
Cause: The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
Action:
- Wait a moment and try to connect a second time.
- Check which services are currently known by the listener by executing: lsnrctl services <listener name>
- Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.
- If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener.
- Check for an event in the listener.log file. -
TNS : could not resove the service name
Here is the line that I added to my PC tnsnames .ora file.
srprod1.PLUS.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = srvprod1)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = GAV.plusfuds.com)
Here is my What I get after I started the listerner.
The global_name is set to TRUE.
db_domain is also set to plusfunds.com
LSNRCTL for Solaris: Version 10.1.0.2.0 - Production on 30-AUG-2005 17:28:37
Copyright (c) 1991, 2004, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Solaris: Version 10.1.0.2.0 - Production
Start Date 30-AUG-2005 16:18:10
Uptime 0 days 1 hr. 10 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/GAV/101_64/network/admin/listener.ora
Listener Log File /oracle/GAV/101_64/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=srvprod1)(PORT=1521)))
Services Summary...
Service "GAV.plusfunds.com" has 1 instance(s).
Instance "GAV", status READY, has 1 handler(s) for this service...
Service "plusfunds.com" has 1 instance(s).
Instance "GAV", status UNKNOWN, has 3 handler(s) for this service...
The command completed successfully.
Error message :
TNS 12154 could not resolve service name.
What I am missing ?
From
P
SID = GAV
hostname = srvprod1
From,
PFunny thing about this tool is I can connect right now with
PL/SQL developer client and sqlplus client from my PC
successfully but I can not connect through the dbastudio tool
But,
When I tried to connect to dbastudio it is connecting ... I can see in
on DB server that it has been connected with 1521
but nothing is happening on dbastudio tool screen.
Here is the string from tnsnames.ora from my PC file.
GAV_SRVPROD1.PLUS.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = srvprod1)(PORT = 1521))
(CONNECT_DATA = (SID = GAV)(SERVER = DEDICATED))
From
P -
Intermittent errors - Invoke() could not find the Service name
Users are getting intermittent error : Invoke() could not find the Service name, when opening the Xcelsius dashboards in PRODUCTION. The dashboard has several QAAW queries .These errors are poping up intermittently.
The dashboards are hosted utside the BO environment.
BOXIR3.1
Crystal Xcelsius 2008 EnterpriseAs I continue to look into it, the only thing that I see differently when I am prompted for login is that I can specify the system to log into. I am now wondering if somehow this information is being lost and that is what is causing these issues. Given that the specified name cannot be found and that it does in fact recognize the correct name, I'm not entirely sure what the problem is.
Further information:
If I disable the use of hard-coded logins and I am prompted, I can display results for the onLoad run. Yet the query is also set to refresh on 30 second intervals. On every subsequent interval I am getting this error.
I think this has something to do with sessions. How do I check which sessions exist on my box? CmcApp somewhere?
Edited by: Brian Comeau on Jun 4, 2009 12:24 AM
Checking in CmcApp I found some sessions. Here is what happens:
Login to CmcApp Sessions tab
-Administrator: 1 session at 5:45pm
Launch browser to Xcelsius .swf
Prompted for login information: Administrator/password
-Administrator: 2 sessions at 6:30pm
I had previously set the timeout for sessions in QaaWS to 120 seconds
After 2 minutes
-Administrator: 1 session at 5:45pm
Yet throughout this time, I am still given this "invoke() could not find the service name" error. The name provided "qaawsIncidents" is the same name that I can see if I launch QaaWS.
Ideas?
Edited by: Brian Comeau on Jun 4, 2009 12:30 AM -
Hi guys,
I tried to execute a package with Oracle Data Source from Integration Services Catalogs and I got the following error.
ORA-12154: TNS:could not resolve the connect identifier specified
The package runs fine from the SSIS project but once I deploy to SSIS Catalog it fails to run. I need help!
Thanks
meHello ,
The ORA-12154 is a very common error, always related to your local copy of the tnsnames.ora file, your listener configuration and your database name aliases.
Make sure that your listener is listening for the same service name that you are using.
Your service name might have an alias, so check for global (world) entries and local entries. Check:
$ORACLE_HOME/network/admin/tnsnames.ora
Check your global_name setting with this SQL:
select * from global_name;
Ref :
http://www.dba-oracle.com/t_ora_12154_tns_resolve_service_name.htm
Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/ -
Bad public user name or password. ORA-12154: TNS:could not resolve the conn
I tried by all means to resolve the issue, but still i am not able to configure P6 professional to my existing database.
I am always getting error " *Bad public user name or password. ORA-12154: TNS:could not resolve the connect identifier specified*".
I am able to connect to database using pubuser or privuser via CMD.
I also tried through Net Configuration Assistance but no success.
Plz help me in this issue.resolved
-
ORA-12154: TNS:could not resolve the connect identifier speci
Getting this Error on our new windows 7 64bit OS
i am running both in the App and Ora in the XP compatibility mode.
A database error occurred in OCILogon (-1).
ORA-12154: TNS:could not resolve the connect identifier specified
<null>
The debug Console give's the following message.
"App Debug Console enabled
(switched to code page 1252)
ORASP>orasp_oci_open: ORA-12154: TNS:could not resolve the connect identifier specified
I can make the conection to the db by Loging directly into the Oracle SQL using the same info as my sams.
the conection works fine on our old XP OS....
any idea what i have to do to get this to run on Windows 7
thanksHi,
1) Check the tnsnames.ora file you are using, verify that it is accessible.
Eg: On Unix:
- Check if you have a $HOME/.tnsnames.ora file - This will be
used in addition to 'tnsnames.ora'.
- Check TNS_ADMIN is set in your environment.
- There is a readable tnsnames.ora file in $TNS_ADMIN
2) Ensure that the tnsnames.ora file contains a line of the form
'alias=(...)' for the alias you are specifying.
Aliases are NOT case sensitive.
3) Make sure that there are no mismatched parentheses in the
tnsnames.ora file.
4) Even if TNS_ADMIN is set SQL*Net looks in other locations for
configuration files. Check the default directories for old (or bad)
copies of TNS_NAMES.ORA. Eg: /etc, /var/opt/oracle,
$ORACLE_HOME/network/admin
5) Check the default domain name being used, and the path used to
locate aliases, in the SQLNET.ORA file.
The default domain is specified in the NAMES.DEFAULT_DOMAIN
parameter - this is appended to the alias specified in the
connect string if there is no domain given.
Eg: If NAMES.DEFAULT_DOMAIN=mydom.uk
and a connect to "scott/tiger@mydb" is requested
SQL*Net will look for the alias "mydb.mydom.uk"
If NAMES.DIRECTORY_PATH is also specified this determines where
SQL*Net looks for the alias expansion.
6) If none of these show an error enable client side tracing
at level 16 and see what has been written to the client trace
file. There list of aliases in the trace file under the heading
'TNS.NAMES.ORA TABLE HAS THE FOLLOWING CONTENTS'.
7) If ORA-12154 is returned when selecting over a database link from a
client check that the alias in the link can be resolved in the
tnsnames.ora file ON THE SERVER.
8) If you are connecting from a login dialog box, verify that you are
not placing an "@" symbol before your connect net service name.
9) When going from Windows to Linux/Unix platforms,
you can see <carriage return> <new line> characters at the
end of each line instead of <new line> <new line>. Be sure you
use ascii mode when ftp'ing this between Windows and Linux/Unix.
Regards,
Kal -
Hi Gurus,
I need your help!
I am implementing dataguard through RMAN, where my primary database is mydb and my standby database is orcl. I am pasting step by step process and atlast the error message which I am getting. Please do help me to resolve it.
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [orcl] ? mydb
The Oracle base for ORACLE_HOME=/u01/home/oracle/product/11.2.0/db_1 is /u01/app/oracle
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 5 09:24:56 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select db_unique_name, database_role, open_mode from v$database;
DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE
mydb_un PRIMARY READ WRITE
SQL> show parameter instance_name
NAME TYPE VALUE
instance_name string mydb
SQL> show parameter service_names
NAME TYPE VALUE
service_names string mydb_un
SQL> !
[oracle@localhost ~]$ . oraenv
ORACLE_SID = [oracle] ? orcl
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/11.2.0/dbhome_1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 5 09:20:04 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select host_name, status from v$instance;
HOST_NAME STATUS
localhost.localdomain STARTED
SQL> show parameter instance_name
NAME TYPE VALUE
instance_name string orcl
SQL> show parameter service_names
NAME TYPE VALUE
service_names string orcl_un
SQL> !
[oracle@localhost ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-JAN-2014 09:27:44
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 05-JAN-2014 08:17:31
Uptime 0 days 1 hr. 10 min. 15 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "mydbXDB" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...
Service "mydb_un" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...
Service "orcl_un" has 1 instance(s).
Instance "orcl", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost ~]$ tnsping mydb
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 05-JAN-2014 09:27:54
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/u01/home/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mydb_un)))
OK (0 msec)
[oracle@localhost ~]$ tnsping orcl
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 05-JAN-2014 09:28:03
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/u01/home/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl_un)))
OK (0 msec)
[oracle@localhost admin]$ more listener.ora
# listener.ora Network Configuration File: /u01/home/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = mydb_un)
(ORACLE_HOME = /u01/home/oracle/product/11.2.0/db_1)
(SID_NAME=mydb)
(SID_DESC =
(GLOBAL_DBNAME = orcl_un)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = orcl)
ADR_BASE_LISTENER = /u01/app/oracle
[oracle@localhost admin]$ more tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/home/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
MYDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb_un)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl_un)
[oracle@localhost ~]$ rman target sys/engineer@mydb auxiliary sys/engineer@orcl
Recovery Manager: Release 11.2.0.1.0 - Production on Sun Jan 5 09:30:59 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12154: TNS:could not resolve the connect identifier specified
[oracle@localhost ~]$
Please let me know why I am getting this error if everything is fine above.
Regards,
MichelHere's your issue
(HOST=localhost.localdomain)
If you are going to use "localhost" at least fake it by adding an entry in your /etc/hosts files
Example ( add to both servers so they can see each other )
192.168.0.20 primary.localdomain primary
192.168.0.21 standby.localdomain standby
Does the "hostname" return localhost.localdomain? Setup something so RMAN has something to connect to.
The "/etc/hosts" file must contain a fully qualified name for the server.
<IP-address> <fully-qualified-machine-name> <machine-name>
localhost.localdomain is 127.0.0.1, you don't want that.
Best Regards
mseberg -
Ora-12154:TNS:Could not resolve the connect identifier specified
Helo
I face this error when i tried to connect to the database.
i have been installed 11g database on machine with database name 'hrall'
But when i tried to connect to the database it's shows me error "ora-12154:TNS:Could not resolve the connect identifier specified"
when i put the old database entry an that machine and try ti connect it's connect Successfully.
Kindly Suggest
Regards,
SachinHi Error not solved yet
i am giving you my system details as follow -
OS Name : Microsoft(R) Windows(R) Server 2003 Standard x64 Edition
System Type: x64-based PC
My tnsentry also right
posted as follow -
HRALL.voltasworld.com =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ps-win-hrall.voltasworld.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = hrall)
listener.ora file
# listener.ora Network Configuration File: F:\app\dbadmin\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\app\dbadmin\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\app\dbadmin\product\11.2.0\dbhome_1\bin\oraclr11.dll")
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ps-win-hrall.voltasworld.com)(PORT = 1521))
ADR_BASE_LISTENER = F:\app\dbadmin
Kindly Suggest
Regards
Sachin -
ORA-12154: TNS:could not resolve the connect identifier specified [10g XE]
Greetings
There are many topics on this issue over the internet but None of them addresses this issue properly, so I couldn't find a solution to the problem.
I installed: Oracle Database 10g Express Edition
After the installation was done, I opened SQL Command Line
and I used the command "connect" to login
I enter the username
Then I entered the password
After a couple of seconds I got the following ERROR message:
ORA-12154: TNS:could not resolve the connect identifier specified
Screenshot of the error:
http://i35.tinypic.com/14o26g7.png
I installed this version of Oracle on both Windows XP 32 bit and Windows 7 32 bit and I get the same error message when it tries to connect.
Why doesn't Oracle work right after the installation?
Are there any further steps that need to be done in order to make this work? If so I would really appreciate any step by step help, I've been stuck trying to find a solution for days.
Edited by: user10192105 on Aug 22, 2010 7:34 PM>
I wento to CMD, then I entered sqlplus / as sysdba and that just opened the SQL*Plus program in CMD (SQL>)
But nevertheless I still need to login with a user name and password which and I tried and I got the same error message.
>
We're making progress, you'll be logging in soon....
Get into SQL*Plus with the command I gave you, now type this:
alter user <theusernameyouwant> identified by abc123;followed by (still in SQL*Plus):
connectafter you type "connect", SQL*Plus will ask you for a user name and password. Use the same user name and password you used in the alter command.
HTH,
John. -
ORA-12154: TNS:could not resolve the connect identifier specified Oracle 11
I'm having a slight issue with Oracle 11 R2
Oracle 10g was removed from the machine - The registry was cleared and I couldn't see anything of 10g left.
I then installed Oracle 11 with just the software only, and then created a listener.
Using the Database Configuration Assistant, I tried to add a database but I get the error:
'ORA-12154: TNS:could not resolve the connect identifier specified'
The TNS_ADMIN is set to: \\ravel\tnsnames and I can connect to other instances around the company.
My tnsnames entry is:
GMAN_1120.WORLD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = gman)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ora112)
If i start the listener i get:
TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
System parameter file is D:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
Log messages written to d:\oracle\diag\tnslsnr\gman\listener\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gman)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
Start Date 03-AUG-2011 10:34:28
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File d:\oracle\diag\tnslsnr\gman\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gman)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ora112" has 1 instance(s).
Instance "ora112", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>
Can anyone spot what may have gone wrong? I've setup 10g multiple times and never had a problemI can tnsping my machine using another machine:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = gman)(PORT = 1521))) (CONNECT_DATA = (SERVIC
E_NAME = ora112)))
OK (30 msec)
My listener.ora file is:
# listener.ora Network Configuration File: D:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(SID_DESC=
(GLOBAL_DBNAME=ora112)
(ORACLE_HOME=D:\oracle\product\11.2.0\dbhome_1)
(SID_NAME=ora112)
) -
TNS:could not resolve the connect identifier specified
I am at the end of my rope and I would really appreciate some assistance.
I get the error: "TNS:could not resolve the connect identifier specified " from my ASP pages and "Warning: oci_connect() [function.oci-connect]: Error while
trying to retrieve text for error ORA-12154" when connecting from php pages.
I am trying to access these pages from the same server as the database.
I manage to connect to the database homepage, but only after I manually stop and start the database after a restart (why?).
I have been reading forums and I have been googling for days. I think this is what you guys need to know to be able to help me.
General information:
Oracle Database 10g Express Edition Universal
Windows Server 2003 Standard SP 1
IIS 6
PHP Version 5.1.2
ASP allowed "normal" scrips runs ok
Php Allowed "normal" scrips runs ok
system variable path
C:\oraclexe\app\oracle\product\10.2.0\server\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\php;C:\instantclient_10_2
(server has been rebooted since last editing)
IUSR_Curium has full control on following folders including subfolders:
c:\windows\temp
C:\oraclexe
C:\instantclient_10_2
IWAM_Curium
IUSR_Curium has full control on following folders including subfolders:
c:\windows\temp
C:\oraclexe
C:\instantclient_10_2
HTTP access is set to "Available from local server and remote clients"
All oracle related services except OracleJobSchedulerXE is set to Automatic and is in status started
I can ping curium and i get a response from the server's public IP-Adress
I can ping localhost and i get a response from 127.0.0.1
This is my connection in ASP:
Set OraConn = Server.CreateObject("ADODB.Connection")
Oraconn.ConnectionString = "Driver={Microsoft ODBC for Oracle};Server=xe;Uid=hr;Pwd=hr;"
ASP connection gives the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified
/asptest/test.asp, line 5
This is my connection in php
$conn = oci_connect('hr', 'hr', 'xe');
PHP connection gives the following error:
Warning: oci_connect() [function.oci-connect]: Error while trying to retrieve text for error ORA-12154 in c:\Inetpub\wwwroot\index1.php on line 3
Error while trying to retrieve text for error ORA-12154
C:\>lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-MAR-2006 22:09:01
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 21-MAR-2006 20:57:04
Uptime 0 days 1 hr. 11 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=curium)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=curium)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\>lsnrctl services
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-MAR-2006 22:11:39
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:38 refused:0 current:24 max:1002 state:ready
DISPATCHER <machine: CURIUM, pid: 1972>
(ADDRESS=(PROTOCOL=tcp)(HOST=curium)(PORT=1045))
Service "XE_XPT" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0 state:ready
LOCAL SERVER
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0 state:ready
LOCAL SERVER
The command completed successfully
C:\>tnsping XE
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-MAR-2
006 22:14:10
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = curium)(
PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (10 msec)
C:\>sqlplus system/xxxxx as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Ti Mar 21 22:15:38 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
C:\>sqlplus hr/hr@XE
SQL*Plus: Release 10.2.0.1.0 - Production on Ti Mar 21 22:15:21 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
C:\>sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Ti Mar 21 22:15:02 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
Litener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = curium)(PORT = 1521))
DEFAULT_SERVICE_LISTENER = (XE)
sqlnet.ora
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES = (nts)
tsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = curium)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
Sorry for the long post....
Best regards
Roy-Christian Natland
NorwayGreat post - it has nearly everything needed for diagnosis. Well done.
The database is working, and the listener is listening. The successful tnsping to XE shows me that the client subsystem (at least in the oraclexe) path is set up correctly.
However, two other non-oracle clients (ASP and PHP) cannot see the definition for the XE server. This suggests to me that something is pointing them to another Oracle client software set up
I note that you have C:\instantclient_10_2 in your path - so presumably you had/have installed Instant Client on this machine as well ?
Given that you are on the server box, I don't think you need the Instant Client set up. It's possible that this is what is misdirecting the other clients you are suing. Try taking this out of your path.
If that doesn't work, can you provide the output of a SET command issued from the command line. -
Discoverer Plus Error: ORA-12154:TNS:could not resolve the
Hi,
I’m running the Discoverer report in Discoverer Plus and getting the below error, but when the same report ran in Desktop completes successfully and the SQL from the report is running without error in SQL nav.
Database Error - ORA-12154:TNS:could not resolve the connect identifier specified.
Thanks in Advance.
SunilHi Sunil,
Did you test the direct method I posted above? That will bypass the tnsnames.ora file. If it connects fine that way, then you likely have a configuration issue with your sqlnet.ora and/or tnsnames.ora
You can test with:
$ORACLE_HOME/bin/tnsping <tnsalias>
If it is successful, then check if you have the TNS_ADMIN environment variable set (echo $TNS_ADMIN) -- assuming Linix/Unix, if Windows, check system environment variables
You may TNS_ADMIN set and pointing to a tnsnames.ora that is not in the default location.
If it fails and your tns entry is correct in the tnsnames.ora file, then you may need to look at the sqlnet.ora
For example,
If you have NAMES.DEFAULT_DOMAIN set.. then you would need enter: <tnsalias>.<domain> (i.e. scott.world)
or you may need to check if TNSNAMES is first in NAMES.DIRECTORY_PATH=
You can remove or rename the sqlnet.ora to make sure that is not an issue.
Hope that helps. Good Luck.
~Steve. -
Unable to resolve ORA-12154: TNS:could not resolve the connect identifier specified
Hi Friends,
I am unable to resolve ORA-12154: TNS:could not resolve the connect identifier specified, error:
C:\Windows\system32>sqlplus scott/tiger@ORADATA
SQL*Plus: Release 11.2.0.1.0 Production on Sun Feb 2 13:46:10 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SQL> select database_name from v$database;
DATABASE_NAME
ORADATA
SQL> select instance_name from v$instance;
INSTANCE_NAME
oradata
tnsnames.ora
============
ORADATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL=TCP)(HOST=himanshu-PC)(PORT=1521))
(CONNECT_DATA =
(SERVICE_NAME = oradata)
(SERVER = DEDICATED)
listener.ora
=========
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = himanshu-PC)(PORT = 1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ORADATA)
(ORACLE_HOME = G:\app\himanshu\product\11.2.0\dbhome_1)
(SID_NAME = oradata)
sqlnet.ora
========
SQLNET.AUTHENTICATION_SERVICES = (NTS)
C:\Windows\system32>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 02-FEB-2014 13:53:37
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=himanshu-PC)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
Start Date 02-FEB-2014 13:29:35
Uptime 0 days 0 hr. 24 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File G:\app\himanshu\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File g:\app\himanshu\diag\tnslsnr\himanshu-PC\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=himanshu-PC)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "ORADATA" has 2 instance(s).
Instance "ORADATA", status UNKNOWN, has 1 handler(s) for this service...
Instance "oradata", status READY, has 1 handler(s) for this service...
Service "ORADATAXDB" has 1 instance(s).
Instance "oradata", status READY, has 1 handler(s) for this service...
The command completed successfully
Kindly guide whats wrong with my configuration.ORADATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL=TCP)(HOST=himanshu-PC)(PORT=1521))
(CONNECT_DATA =
(SERVICE_NAME = oradata)
(SERVER = DEDICATED)
Try editing the tnsnames.ora file to check there is any junk characters around the tns entry(shown in RED) and then try pining the tns from CMD as
tnsping ORADATA. -
Toad ORA-12154: TNS:could not resolve the connect identifier specified
I'm installing oracle clients and tools on a new Windows 7 machine issued to me by my company.
I installed a 64 bit 10.2.0.3 oracle client, but found that 64 bit installations don't work with TOAD. So I installed a 32 bit 10.2.0.1 oracle client. I also set up my TNS names files in the network/admin directory of both installations, set up the hosts files, and ensured that the registry information is accurate. I have no ORACLE_HOME environment variable because when I installed the 2nd installation of Oracle it said that I shouldn't have one since I have multiple versions of oracle and it erased it.
I am able to connect and use SQL Plus and SQL Developer with both installations of Oracle, but I'm not able to connect with TOAD. TOAD finds the 32 bit installation and all of its registry information looks correct and TOAD says "The Oracle home is valid". TOAD also loads my TNS file and all associated IPs and everything looks good when I look at them in the the TNS Editor. I am also running TOAD as administrator in order to avoid "Can't initialize OCI. Error -1" errors.
Yet, whenever I try to connect to any database, I get the following error:
"ORA-12154: TNS:could not resolve the connect identifier specified" and then the database I am using
Is there anything else I need to setup because I have multiple installations of Oracle? Or anything else I need to setup running on a 64 bit windows machine with 32 bit installations of oracle and toad?
Thanks for any help you can give.And in case you want to know my registry information:
64 bit installation:
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraClient10g_home2
Class Name: Application Global Data
Last Write Time: 10/5/2010 - 11:36 AM
Value 0
Name: ORACLE_HOME
Type: REG_SZ
Data: C:\oracle\product\10.2.0\client_2
Value 1
Name: ORACLE_HOME_NAME
Type: REG_SZ
Data: OraClient10g_home2
Value 2
Name: ORACLE_GROUP_NAME
Type: REG_SZ
Data: Oracle - OraClient10g_home2
Value 3
Name: ORACLE_BUNDLE_NAME
Type: REG_SZ
Data: Enterprise
Value 4
Name: NLS_LANG
Type: REG_SZ
Data:
Value 5
Name: OLEDB
Type: REG_SZ
Data: C:\oracle\product\10.2.0\client_2\oledb\mesg
Value 6
Name: StmtCacheSize
Type: REG_SZ
Data: 0
Value 7
Name: SQLPATH
Type: REG_SZ
Data: C:\oracle\product\10.2.0\client_2\dbs
Value 8
Name: ORACLE_HOME_KEY
Type: REG_SZ
Data: SOFTWARE\ORACLE\KEY_OraClient10g_home2
32 bit installation:
Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\KEY_OraClient10g_home1
Class Name: Application Global Data
Last Write Time: 10/6/2010 - 12:42 PM
Value 0
Name: ORACLE_HOME
Type: REG_SZ
Data: C:\oracle\product\10.2.0\client_3
Value 1
Name: ORACLE_HOME_NAME
Type: REG_SZ
Data: OraClient10g_home1
Value 2
Name: ORACLE_GROUP_NAME
Type: REG_SZ
Data: Oracle - OraClient10g_home1
Value 3
Name: ORACLE_BUNDLE_NAME
Type: REG_SZ
Data: Enterprise
Value 4
Name: NLS_LANG
Type: REG_SZ
Data: AMERICAN_AMERICA.WE8MSWIN1252
Value 5
Name: SQLPATH
Type: REG_SZ
Data: C:\oracle\product\10.2.0\client_3\dbs
Value 6
Name: ORACLE_HOME_KEY
Type: REG_SZ
Data: SOFTWARE\ORACLE\KEY_OraClient10g_home1
And my environment variables:
TNS_ADMIN: C:\Oracle\product\10.2.0\client_3\NETWORK\ADMIN
PATH: "C:\oracle\product\10.2.0\client_3\bin;C:\oracle\p roduct\10.2.0\client_2\bin;%SystemRoot%\system32;% SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT %\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin"
The string "C:\oracle\product\10.2.0\client_3\bin" is the bin directory for my 32 bit installation.
The string "C:\oracle\product\10.2.0\client_2\bin" is the bin directory for my 64 bit installation.
Maybe you are looking for
-
Should I relate a fact table to a fact table to a dimension table?
Hi All, I'm designing a dimensional data mart for a client and I'm now forced to think about many-to-many relationships, among other complexities I haven't dealt with until now. Said client needs to be able to analyze contracts, subcontracts, bids,
-
Installing Oracle 11g client 32 bit, on a windows 64 bit platform
Hi all, I was searching the forum and came and found out that PL/SQL developer is only 32 bit for the time being and can only be used with a 32 bit oracle client. I need to use PL/SQL developer so I want to know that will a 32 bit client work perfect
-
Weird screen issues with 10.7.2
I just updated to 10.7.2 tonight, and immediately following the reboot, I started having problems. Scrolling in any finder window, or moving any windows around my screen causes screen corruption in the areas that are affected. If I scroll in a finder
-
RGB/CMYK to Grayscale by script or right click?
Is there a way to convert RGB/CMYK to Grayscale by script? I need to convert 475 images to grayscale. But I can´t use Color2Gray plugin into Indesign for erros message - I don´t know why. I know there is another method in Indesign to make it (menu Ef
-
Although I am expecting this to happen, but when it does happen, it's really irritating. I read in one of the support documents in Apple's Support site, stating that if I want to change the site or page names, I'll have to do it in the site navigatio