$ oerr ora 12514 12514, 00000, "TNS:listener could not resolve SERVICE_NAME given in connect descriptor" // *Cause: The SERVICE_NAME in the CONNECT_DATA was not found in // the listener's tables. // *Action: Check to make sure that the SERVICE_NAME specified is correct. // *Comment: This error will be returned if the (database) service has not been // registered with the listener; a database instance that is part of this // service may need to be started or configured properly.
Muhammad Nadeem wrote:=================================
I have the following error when try to connect the database thru form developer:
TNS:listener does not currently know of service requested in connect descriptor
any one have the solution?
Now, when you issue a connect, say like this:
larry = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = curley) ) )
tns will look in your tnsnames.ora for an entry called 'larry'. Finding it, tns sends a request through the normal network stack to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
$> sqlplus scott/tiger@larry
tns will attempt to establish an IPC connection to the db instance. How does it know the name of the instance? It uses the current value of the enviornment variable ORACLE_SID. So...
$> sqlplus scott/tiger
It will attempt to connect to the instance known as "fred". If there is no such instance, it will, of course, fail. Also, if there is no value set for ORACLE_SID, the connect will fail.
$> export ORACLE_SID=fred $> sqlplus scott/tiger
set ORACLE_SID appropriately, and connect
[oracle@vmlnx01 ~]$ ps -ef|grep pmon|grep -v grep oracle 4236 1 0 10:30 ? 00:00:00 ora_pmon_vlnxora1
Now set ORACLE_SID to a bogus value, and try to connect
[oracle@vmlnx01 ~]$ export ORACLE_SID='vlnxora1 [oracle@vmlnx01 ~]$ sqlplus scott/tiger SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:37 2010 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
Now set ORACLE_SID to null, and try to connect
SQL> exit [oracle@vmlnx01 ~]$ export ORACLE_SID=FUBAR [oracle@vmlnx01 ~]$ sqlplus scott/tiger SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:57 2010 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory Enter user-name:
Ok, that is how we get from the client connection request to the listener. What about the listener's part of all this?
[oracle@vmlnx01 ~]$ export ORACLE_SID= [oracle@vmlnx01 ~]$ sqlplus /scott/tiger SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:43:24 2010 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. ERROR: ORA-12162: TNS:net service name is incorrectly specified