Home » Other » Client Tools » ORA-12504, TNS:listener was not given the SID in CONNECT_DATA (Red Hat, Oracle 11g)  () 1 Vote
ORA-12504, TNS:listener was not given the SID in CONNECT_DATA [message #596598] Wed, 25 September 2013 02:39 Go to next message
deepak416
Messages: 63
Registered: January 2013
Location: Pune
Member
Hi i am getting below error. Any Suggestions
[Prime@localhost Prime]$ java -classpath /home/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar utils.dbping ORACLE_THIN system systesm 10.66.12.70:1521

Error encountered:

java.sql.SQLException: Listener refused the connection with the following error:
ORA-12504, TNS:listener was not given the SID in CONNECT_DATA

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:419)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:538)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:228)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at utils.dbping.main(dbping.java:204)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12504, TNS:listener was not given the SID in CONNECT_DATA

at oracle.net.ns.NSProtocol.connect(NSProtocol.java:394)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1056)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:308)
... 7 more


Listenre File
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CISCONEW)
(ORACLE_HOME = /opt/oracle/product/11.2.0/)
)
)


LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.66.12.70)(PORT = 1521))
)
)

ADR_BASE_LISTENER = /opt/oracle

tnsname.ora file

LISTENER_CISCONEW =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.66.12.70)(PORT = 1521))


LISTENER_CISCO =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.66.12.70)(PORT = 1521))


CISCONEW =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.66.12.70)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CISCONEW)
)
)
Re: ORA-12504, TNS:listener was not given the SID in CONNECT_DATA [message #596600 is a reply to message #596598] Wed, 25 September 2013 02:46 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You to add slash and the instance name to the end of the string,

http://docs.oracle.com/cd/E13222_01/wls/docs81/admin_ref/utils11.html

Re: ORA-12504, TNS:listener was not given the SID in CONNECT_DATA [message #596621 is a reply to message #596600] Wed, 25 September 2013 03:42 Go to previous message
deepak416
Messages: 63
Registered: January 2013
Location: Pune
Member
Problem solved thanks... Smile
Previous Topic: char differences between SQL+ and SQL developer
Next Topic: how to set connection property "oracle.jdbc.thinLogonCapability"
Goto Forum:
  


Current Time: Thu Mar 28 07:26:03 CDT 2024