java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:服务里面的OracleServiceORCL和OracleOraDb11g_home1TNSListener都打开了,LISTENER.ORA下面的(HOST=zhangyang)也改成计算机名了,没用loc

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/20 17:06:31
java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:服务里面的OracleServiceORCL和OracleOraDb11g_home1TNSListener都打开了,LISTENER.ORA下面的(HOST=zhangyang)也改成计算机名了,没用loc
xT[OA+cJRÃk!SLvNhLE.%<@E4` ?l_pv7h1lvNsr^%))㝃*Q` ",`2c`!I dYĒA1"6UO_s^>NZP5~CE8{17D:ɢH=POβpuI(ޥ:ݒhS-?V&n$T}bmHaeDV*: 3n[t6MFV@S'6 {>*\|~Ä-+( P7Ve#KǼG᪗ugk W&AuǙcjN$T2yJ5?b~w&I9TPK <(xȉq b nc\ڲ/Lu׎#-=5p 90 g%>St;|gkou1@6rBi\ݿ'kgG*JIsS~ʙ}/l_y& smd:[tZiʹRҼ-+lUqFBU $+Ͷjy׏|Ңj<\mx]:Z +&Ev6w!W

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:服务里面的OracleServiceORCL和OracleOraDb11g_home1TNSListener都打开了,LISTENER.ORA下面的(HOST=zhangyang)也改成计算机名了,没用loc
java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:
服务里面的OracleServiceORCL和OracleOraDb11g_home1TNSListener都打开了,LISTENER.ORA下面的(HOST=zhangyang)也改成计算机名了,没用localhost,还是报异常,求教!
Class.forName("oracle.jdbc.driver.OracleDriver");
\x09\x09} catch (ClassNotFoundException e) {
\x09\x09\x09// TODO Auto-generated catch block
\x09\x09\x09e.printStackTrace();
\x09\x09}
\x09\x09try {
\x09\x09\x09conn=DriverManager.getConnection("jdbc:oracle:thin:@zhangyang:1521:Admin","zhangpeng","zhangpeng");
\x09\x09\x09System.out.println("数据库连接成功3");
\x09\x09} catch (SQLException e) {
\x09\x09\x09// TODO Auto-generated catch block
\x09\x09\x09e.printStackTrace();
\x09\x09\x09
\x09\x09\x09\x09conn.close();
\x09\x09\x09\x09System.out.println("数据库关闭成功3");
\x09\x09\x09} catch (SQLException e) {
\x09\x09\x09\x09// TODO Auto-generated catch block
\x09\x09\x09\x09e.printStackTrace();

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:服务里面的OracleServiceORCL和OracleOraDb11g_home1TNSListener都打开了,LISTENER.ORA下面的(HOST=zhangyang)也改成计算机名了,没用loc
监听器确认lsnrctl status是否正常
Java代码里的连接字符串是否和服务器一致、尤其是数据库SID名