新建連接如下:
Connection Name: hr_orcl
Username: hr
Password: hr
Select Save Password checkbox
Hostname: localhost  將此處改為了192.168.0.105,建立的別的數據庫可以連通。
Port: 1521
SID: orcl在點擊測試後出下如下的錯誤:
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:192.168.0.105:1521:hr_orcl

解决方案 »

  1.   


    命令行下运行 :lsnrctl service检查侦听器上注册的数据库服务名是否为 orcl
      

  2.   

    监听器注册的是wilson, 这里要怎么改啊。[oracle@Karl ~]$ lsnrctl serviceLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-JAN-2011 17:13:43Copyright (c) 1991, 2009, Oracle.  All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Karl)(PORT=1521)))
    Services Summary...
    Service "wilson" has 1 instance(s).
      Instance "wilson", status READY, has 1 handler(s) for this service...
        Handler(s):
          "DEDICATED" established:4 refused:0 state:ready
             LOCAL SERVER
    Service "wilsonXDB" has 1 instance(s).
      Instance "wilson", status READY, has 1 handler(s) for this service...
        Handler(s):
          "D000" established:0 refused:0 current:0 max:1022 state:ready
             DISPATCHER <machine: Karl, pid: 3272>
             (ADDRESS=(PROTOCOL=tcp)(HOST=Karl)(PORT=35722))
    The command completed successfully
      

  3.   

    tnsping看看通不通,还有防火墙的设置…
      

  4.   


    (HOST=Karl)把你的监听文件的主机改成你的ip地址listener.ora文件里修改。。
      

  5.   

    将 sid 改为 wilson