• <bdo id='jFs6a'></bdo><ul id='jFs6a'></ul>

  • <tfoot id='jFs6a'></tfoot>

        <small id='jFs6a'></small><noframes id='jFs6a'>

      1. <legend id='jFs6a'><style id='jFs6a'><dir id='jFs6a'><q id='jFs6a'></q></dir></style></legend>

        <i id='jFs6a'><tr id='jFs6a'><dt id='jFs6a'><q id='jFs6a'><span id='jFs6a'><b id='jFs6a'><form id='jFs6a'><ins id='jFs6a'></ins><ul id='jFs6a'></ul><sub id='jFs6a'></sub></form><legend id='jFs6a'></legend><bdo id='jFs6a'><pre id='jFs6a'><center id='jFs6a'></center></pre></bdo></b><th id='jFs6a'></th></span></q></dt></tr></i><div id='jFs6a'><tfoot id='jFs6a'></tfoot><dl id='jFs6a'><fieldset id='jFs6a'></fieldset></dl></div>

        TNS-12505:TNS:listener 当前不知道连接描述符中给出的 SID

        时间:2023-09-19
          <tbody id='BDNDg'></tbody>
          <legend id='BDNDg'><style id='BDNDg'><dir id='BDNDg'><q id='BDNDg'></q></dir></style></legend>
            • <bdo id='BDNDg'></bdo><ul id='BDNDg'></ul>

                <tfoot id='BDNDg'></tfoot>

                <small id='BDNDg'></small><noframes id='BDNDg'>

                <i id='BDNDg'><tr id='BDNDg'><dt id='BDNDg'><q id='BDNDg'><span id='BDNDg'><b id='BDNDg'><form id='BDNDg'><ins id='BDNDg'></ins><ul id='BDNDg'></ul><sub id='BDNDg'></sub></form><legend id='BDNDg'></legend><bdo id='BDNDg'><pre id='BDNDg'><center id='BDNDg'></center></pre></bdo></b><th id='BDNDg'></th></span></q></dt></tr></i><div id='BDNDg'><tfoot id='BDNDg'></tfoot><dl id='BDNDg'><fieldset id='BDNDg'></fieldset></dl></div>
                1. 本文介绍了TNS-12505:TNS:listener 当前不知道连接描述符中给出的 SID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用以下连接字符串从 NetBeans 连接到 Oracle 10.2.0:

                  I'm trying to connect to Oracle 10.2.0 from NetBeans, using the following connection string:

                  jdbc:oracle:thin:@localhost:1521:XE
                  

                  最奇怪的部分是一切正常,直到重启之一.我开始一直收到这个 TNS-12505 错误;查看我的 listener.log 中的最终条目:

                  The weirdest part is that everything worked fine, until the one of the reboots. I started getting this TNS-12505 errors all the time; look at the final entries in my listener.log:

                  TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 14-APR-2011 13:46:48
                  
                  Copyright (c) 1991, 2005, Oracle.  All rights reserved.
                  
                  System parameter file is D:oraclexeapporacleproduct10.2.0server
                  etworkadminlistener.ora
                  Log messages written to D:oraclexeapporacleproduct10.2.0server
                  etworkloglistener.log
                  Trace information written to D:oraclexeapporacleproduct10.2.0server
                  etwork	racelistener.trc
                  Trace level is currently 0
                  
                  Started with pid=3460
                  Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.pipeEXTPROC_FOR_XEipc)))
                  Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Brodyaga-PC)(PORT=1521)))
                  Listener completed notification to CRS on start
                  
                  TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
                  14-APR-2011 13:48:54 * (CONNECT_DATA=(SID=XE)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Brodyaga))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=58458)) * establish * XE * 12505
                  TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
                  14-APR-2011 13:49:00 * (CONNECT_DATA=(SID=XE)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Brodyaga))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=58481)) * establish * XE * 12505
                  TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
                  14-APR-2011 13:49:02 * (CONNECT_DATA=(SID=XE)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Brodyaga))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=58487)) * establish * XE * 12505
                  TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
                  14-APR-2011 13:50:23 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Brodyaga))(COMMAND=services)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * services * 0
                  

                  前三个条目是我从 NetBeans 连接的尝试.第四个,通过 SQL*Plus 连接,工作正常.

                  The first three entries are my attempts to connect from NetBeans. The fourth, the connection via SQL*Plus, worked just fine.

                  这里是我的listener.ora的内容:

                  Here are the contents of my listener.ora:

                  SID_LIST_LISTENER =
                    (SID_LIST =
                      (SID_DESC =
                        (SID_NAME = PLSExtProc)
                        (ORACLE_HOME = D:oraclexeapporacleproduct10.2.0server)
                        (PROGRAM = extproc)
                      )
                      (SID_DESC =
                        (SID_NAME = CLRExtProc)
                        (ORACLE_HOME = D:oraclexeapporacleproduct10.2.0server)
                        (PROGRAM = extproc)
                      )
                    )
                  
                  LISTENER =
                    (DESCRIPTION_LIST =
                      (DESCRIPTION =
                        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
                        (ADDRESS = (PROTOCOL = TCP)(HOST = Brodyaga-PC)(PORT = 1521))
                      )
                    )
                  
                  DEFAULT_SERVICE_LISTENER = (XE)
                  

                  tnsnames.ora:

                  And tnsnames.ora:

                  XE =
                    (DESCRIPTION =
                      (ADDRESS = (PROTOCOL = TCP)(HOST = Brodyaga-PC)(PORT = 1521))
                      (CONNECT_DATA =
                        (SERVER = DEDICATED)
                        (SERVICE_NAME = XE)
                      )
                    )
                  
                  EXTPROC_CONNECTION_DATA =
                    (DESCRIPTION =
                      (ADDRESS_LIST =
                        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
                      )
                      (CONNECT_DATA =
                        (SID = PLSExtProc)
                        (PRESENTATION = RO)
                      )
                    )
                  
                  ORACLR_CONNECTION_DATA = 
                    (DESCRIPTION = 
                      (ADDRESS_LIST = 
                        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) 
                      ) 
                      (CONNECT_DATA = 
                        (SID = CLRExtProc) 
                        (PRESENTATION = RO) 
                      ) 
                    ) 
                  

                  以及来自 > lsnrctl services

                  C:UsersBrodyaga>lsnrctl services
                  
                  LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 14-APR-2011 13:59
                  :45
                  
                  Copyright (c) 1991, 2005, Oracle.  All rights reserved.
                  
                  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
                  Services Summary...
                  Service "CLRExtProc" has 1 instance(s).
                    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
                      Handler(s):
                        "DEDICATED" established:0 refused:0
                           LOCAL SERVER
                  Service "PLSExtProc" has 1 instance(s).
                    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
                      Handler(s):
                        "DEDICATED" established:0 refused:0
                           LOCAL SERVER
                  The command completed successfully
                  

                  两个 Oracle 服务都已启动并且 SQL*Plus 连接正常.

                  Both Oracle services are started and SQL*Plus connects fine.

                  是否有解决此错误的方法?

                  Is there some workaround for this error?

                  推荐答案

                  您需要为 XE 添加 SID 条目,以便向侦听器注册实例.

                  You need to add the SID entry for XE in order to register the instance with the listener.

                  安装 Oracle XE 后,一切看起来都不错,但是当您发出

                  After installation of Oracle XE, everything looks good, but when you issue

                  C:>sqlplus / as sysdba
                  SQL>shutdown immediate
                  SQL>startup
                  
                  TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
                  

                  该实例不会向侦听器注册.

                  the instance will not register with the listener.

                  所以请像这样编辑你的 listener.ora:

                  So please edit your listener.ora like this:

                  SID_LIST_LISTENER =
                    (SID_LIST =
                       (SID_DESC =
                         (SID_NAME = XE)
                         (ORACLE_HOME = C:oraclexeapporacleproduct10.2.0server)
                       )
                       (SID_DESC =
                          (SID_NAME = PLSExtProc)
                          (ORACLE_HOME = D:oraclexeapporacleproduct10.2.0server)
                          (PROGRAM = extproc)
                       )
                       (SID_DESC =
                         (SID_NAME = CLRExtProc)
                         (ORACLE_HOME = D:oraclexeapporacleproduct10.2.0server)
                         (PROGRAM = extproc)
                       )
                    )
                  

                  这个问题是我在 Windows 7 上安装 Oracle XE 时出现的.我在 Windows XP 上没有遇到这个问题.通常,此条目不是必需的,因为实例应自动向侦听器注册.在 Linux (Fedora) 上运行 Oracle XE,无需将 XE 添加到 sid-list.

                  This issue came up when I installed Oracle XE on Windows 7. I did not face this problem on Windows XP. In general, this entry should not be necessary, because the instance should register with the listener automatically. Running Oracle XE on Linux (Fedora), there is no need to add XE to the sid-list.

                  这篇关于TNS-12505:TNS:listener 当前不知道连接描述符中给出的 SID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 Oracle SQL Developer 中找到哪些表引用了给定的表? 下一篇:oracle中CURRENT_TIMESTAMP和SYSDATE不同

                  相关文章

                  <small id='GAD08'></small><noframes id='GAD08'>

                    • <bdo id='GAD08'></bdo><ul id='GAD08'></ul>
                    <i id='GAD08'><tr id='GAD08'><dt id='GAD08'><q id='GAD08'><span id='GAD08'><b id='GAD08'><form id='GAD08'><ins id='GAD08'></ins><ul id='GAD08'></ul><sub id='GAD08'></sub></form><legend id='GAD08'></legend><bdo id='GAD08'><pre id='GAD08'><center id='GAD08'></center></pre></bdo></b><th id='GAD08'></th></span></q></dt></tr></i><div id='GAD08'><tfoot id='GAD08'></tfoot><dl id='GAD08'><fieldset id='GAD08'></fieldset></dl></div>

                  1. <tfoot id='GAD08'></tfoot>
                    <legend id='GAD08'><style id='GAD08'><dir id='GAD08'><q id='GAD08'></q></dir></style></legend>