Oracle Error 12505 Jdbc
Contents |
here for a quick overview of the site Help Center Detailed answers to any ora-12505 tns listener does not currently know of sid questions you might have Meta Discuss the workings and policies listener refused the connection with the following error ora-12505 in oracle sql developer of this site About Us Learn more about Stack Overflow the company Business Learn more about
Ora 12505 Error In Sql Developer
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Ora-12505 Oracle 11g
Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ORA-12505, TNS:listener does not currently know of SID given in connect descriptor up vote 81 down vote favorite 22 I have installed Oracle 11g Express Edition Release 2 in ora 12505 solution my windows 7 64 bit OS and tried to execute JDBC program, then I got the following error: java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412) at oracle.jdbc.driver.PhysicalConnection.
here for a quick overview of the site Help Center Detailed answers to any questions
Listener Refused The Connection With The Following Error Ora-12514
you might have Meta Discuss the workings and policies of ora-12505 jdbc thin client this site About Us Learn more about Stack Overflow the company Business Learn more about hiring java.sql.sqlexception: listener refused the connection with the following error: developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is http://stackoverflow.com/questions/18192521/ora-12505-tnslistener-does-not-currently-know-of-sid-given-in-connect-descript a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up JDBC: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor up vote 1 down vote favorite I am using Oracle 12C as my database. I've written a small JDBC http://stackoverflow.com/questions/30861061/jdbc-ora-12505-tnslistener-does-not-currently-know-of-sid-given-in-connect-de connection program in Java but I am facing an issue with the listener. import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; public class JdbcConnection { public static void main(String[] args) throws SQLException,ClassNotFoundException { String url = "jdbc:oracle:thin:@localhost:1521:orcl"; String user = "system"; String password = "password"; Connection connection = null; Class.forName("oracle.jdbc.driver.OracleDriver"); connection = DriverManager.getConnection(url, user, password); if(connection!=null){ System.out.println("Success in connnection"); } else { System.out.println("failure in connection "); } } } I am getting the following exception: C:\Users\Administrator\Desktop>java JdbcConnection Exception in thread "main" java.sql.SQLException: Listener refused the connectio n with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor The Connection descriptor used by the client was: localhost:1521:orcl at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java :112) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java :261) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387) at oracle.jdbc.driver.PhysicalConnection.
CommunityOracle User Group CommunityTopliners CommunityOTN Speaker BureauJava CommunityError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without https://community.oracle.com/thread/2600172 it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please http://www-01.ibm.com/support/docview.wss?uid=swg21691583 type your message and try again. More discussions in General Database Discussions All PlacesDatabaseGeneral Database Discussions This discussion is archived 13 Replies Latest reply listener refused on Nov 5, 2013 9:39 PM by sandeep.c ORA-12505, TNS:listener does not currently know of SID given in connect descriptor sandeep.c Nov 5, 2013 3:31 PM Hello Everybody,.I would like to know,what am I missing here...I have the following Java code/** * Connect to Oracle Database. */ private listener refused the static void oracleConnect() { Connection conn = null; try { //Class.forName("oracle.jdbc.driver.OracleDriver"); conn = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:orcl", "scott", "Scott123"); System.out.println("Connected to the Oracle database..."); } /*catch (ClassNotFoundException e) { e.printStackTrace(); } */catch (SQLException e) { e.printStackTrace(); } finally { try { conn.close(); System.out.println("Connection closed..."); } catch (SQLException e) { e.printStackTrace(); } } }Exception: java.sql.SQLException: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptor at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412) at oracle.jdbc.driver.PhysicalConnection.
in connect descriptor Technote (troubleshooting) Problem(Abstract) Upgraded database server from Oracle 11.2.0.2 to Oracle 12c. While testing content manager connection, it is failing to connect with the following error. [Content Manager database connection] [ ERROR ] The database connection failed. [ ERROR ] Content Manager failed to connect to the content store. The connection string is "jdbc:oracle:thin:@host_name:port:service_name". The error encountered is: "Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor Cause In an Oracle 12c container database, the client must specify a service name in order to connect to the PDB. Many Database clients with earlierreleases of Oracle Database might have hard-coded connect descriptors touse SID to connect to the database. Now if they choose to plug in their non-CDB?s into a CDB, they will have to modify the connect descriptors in tnsnames.ora on all the client sites. Environment Oracle Container Databases (CDB) / Pluggable Databases (PDB) Resolving the problem This problem can be resolved by the use of listener.ora parameter USE_SID_AS_SERVICE_listener_name. Setting this parameter to on instructs the listener to use the SID in the connect descriptor as a service name and connect the client to the specified database. The default value for this parameter is off and it has to be explicitly set to on to use this functionality. listener.ora to set USE_SID_AS_SERVICE_LISTENER to on USE_SID_AS_SERVICE_LISTENER=on Related information USE_SID_AS_SERVICE_listener_name. Document information More support for: Cognos Business Intelligence Install and Config Software version: 10.2.1 Operating system(s): Windows Reference #: 1691583 Modified date: 28 November 2014 Site availability Site assistance Contact and feedback Need support? Submit feedback to IBM Support 1-800-IBM-7378 (USA) Directory of worldwide contacts Contact Privacy Terms of use Accessibility