写java代码连本机数据库的时候一直出现这个问题:
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
The Connection descriptor used by the client was:
127.0.0.1:1521:ORCL
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:279)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:327)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:360)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:150)
at oracle.jdbc.driver.T4CDriver
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
The Connection descriptor used by the client was:
127.0.0.1:1521:ORCL
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:279)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:327)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:360)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:150)
at oracle.jdbc.driver.T4CDriver