File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes ORA-12514, TNS:listener does not currently know of service requested in connect descriptor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ORA-12514, TNS:listener does not currently know of service requested in connect descriptor" Watch "ORA-12514, TNS:listener does not currently know of service requested in connect descriptor" New topic
Author

ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

suresh sargar
Greenhorn

Joined: Feb 10, 2009
Posts: 10
Hi ,

i am getting below error when i tried to connect to the database using JDBC on local box.

2011/06/10 19:06:45
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was:
ssagar-pun-01:1621/ORA102DB

i provided below value as i/p. e.g hostname, listener port ,username, pwd ,query

ssagar-pun-01 1621 ORA102DB pat1 pat1 "select * from v$instance"

i am using dyamic listener for static listener it's working fine but for dynamic it's not.

SQL> show parameter local

NAME TYPE VALUE
------------------------------------ ----------- ---------------------------
local_listener string XYZ


from tnsnames.ora

XYZ =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SSAGAR-PUN-01)(PORT = 1621))
)
(CONNECT_DATA =
(SERVICE_NAME = ORA102DB)
)
)

from listener.ora
LISTENER1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SSAGAR-PUN-01)(PORT = 1621))
)

lsnrctl status
LSNRCTL> status LISTENER1
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=SSAGAR-PUN-01)(PORT=1621
)))
STATUS of the LISTENER
------------------------
Alias LISTENER1
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
Start Date 10-JUN-2011 18:57:29
Uptime 0 days 0 hr. 5 min. 39 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle10g\network\admin\listener.ora
Listener Log File D:\Oracle10g\network\log\listener1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SSAGAR-PUN-01.adprod.bmc.com)(PORT=1
621)))
Services Summary...
Service "ORA102DBXDB" has 1 instance(s).
Instance "ora102db", status READY, has 1 handler(s) for this service...
Service "primary" has 1 instance(s).
Instance "ora102db", status READY, has 1 handler(s) for this service...
Service "primary_XPT" has 1 instance(s).
Instance "ora102db", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>

i don't have sqlnet.ora in my environment currently .

i am confused why it's not working for dynamic listener.

Thanks,
Suresh.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor