路人乙

心有多大,舞台就有多大。

统计

留言簿(1)

个人blog

技术网站

阅读排行榜

评论排行榜

listener does not currently know of SID given in connect descriptor

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:compiere

-----------------------------------------------
sid写错了。
解决办法是要知道数据库的sid,

select * from v$instance;
看一下你的机器正在跑的SID的名字是什么

其中instance_name就是。
-------------------------------------------
        Connection conn = null;
        
try {
            Class.forName(
"oracle.jdbc.driver.OracleDriver");
            conn 
= DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:compiere""compiere""lwh");
        } 
catch (ClassNotFoundException e) {
            e.printStackTrace();
        } 
catch (SQLException e) {
            e.printStackTrace();
        }
       

1521:后面的就是sid

posted on 2008-10-07 21:22 上帝也犯困 阅读(885) 评论(0)  编辑  收藏 所属分类: 数据库


只有注册用户登录后才能发表评论。


网站导航: