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.