Eclipse引用了哪个TNS文件

时间:2016-06-06 06:47:45

标签: java eclipse

我可以使用PL / SQL开发人员连接到数据库。 但是,当我无法使用DriverManager.getConnection(databaseUrl, idUser, password);

连接到数据库时

我收到此错误

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:673)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
at java.sql.DriverManager.getConnection(DriverManager.java:571)

0 个答案:

没有答案