oracle ora:12505:TNS: 侦听器当前不知道连接描述符中给出的 SID(DBD 错误:OCIServerAttach)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22437910/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 02:16:53  来源:igfitidea点击:

ora:12505:TNS: listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)

oracleoracle11g

提问by Anish

Agent Connection to Instance Status
Failed Details
ORA-12505:

代理连接到实例状态
失败详细信息
ORA-12505:

TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)

TNS:侦听器当前不知道连接描述符中给出的 SID(DBD 错误:OCIServerAttach)

Listener file

侦听器文件

listener.ora Network Configuration File:

listener.ora 网络配置文件:

E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora

E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora

Generated by Oracle configuration tools.

LISTENER =

 (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = 169.254.52.209)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = E:\app\Administrator

tnsnames.orafile

tnsnames.ora文件

tnsnames.ora Network Configuration File:

tnsnames.ora 网络配置文件:

E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora

E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

EDSS =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 169.254.52.209)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = edss)
    )
  )

The listener status

监听器状态

C:\Users\Administrator>lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 17-MAR-2014 09:06:11

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER
------------------------
Alias                    LISTENER

Version                  TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production

Start Date               16-MAR-2014 16:50:30

Uptime                   0 days 16 hr. 15 min. 45 sec

Trace Level              off

Security                 ON: Local OS Authentication

SNMP                     OFF

Listener Parameter File   E:\app\Administrator\product.2.0\dbhome_1\network\admin\listener.ora

Listener Log File         e:\app\administrator\diag\tnslsnr\server\listener\alert\log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.\pipe\EXTPROC1521ipc)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=169.254.52.209)(PORT=1521)))

The listener supports no services

The command completed successfully

"Agent connection to instance status is failed. I could not find out where is the issue"

回答by Steven Ensslen

The lsnrctl statuscommand replied "The listener supports no services". There is a network listener running but it hasn't been told about any databases.

lsnrctl status命令回答“侦听器不支持任何服务”。有一个网络侦听器正在运行,但没有被告知任何数据库。

You need to add services to your listener.ora file. Add a sid_list to your listener.ora like below, then restart the listener.

您需要向listener.ora 文件中添加服务。将 sid_list 添加到您的 listener.ora 中,如下所示,然后重新启动侦听器。

 LISTENER =
 (DESCRIPTION_LIST =
  (DESCRIPTION =
   (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
   (ADDRESS = (PROTOCOL = TCP)(HOST = 169.254.52.209)(PORT = 1521))
  )
 )

SID_LIST_LISTENER =
(SID_LIST =
 (SID_DESC=
  (GLOBAL_DBNAME=edss.your.domain.here)
  (ORACLE_HOME=E:\app\Administrator\product.2.0\dbhome_1)
  (SID_NAME=edss)
 )
)

ADR_BASE_LISTENER = E:\app\Administrator

回答by San

There could be multiple reasons for this issue:

此问题可能有多种原因:

Recently I faced a similar problem with my Oracle 11g on Windows 7 machine. I found that in services.msc, OracleOraDb11g_home1ClrAgentwas not started and its startup type was set to MANUAL.

最近我在 Windows 7 机器上的 Oracle 11g 遇到了类似的问题。我发现在services.mscOracleOraDb11g_home1ClrAgent没有启动并且它的启动类型被设置为MANUAL。

I changed the startup type to AUTOMATIC and started OracleOraDb11g_home1ClrAgentmanually, after that I was able to connect properly.

我将启动类型更改为自动并OracleOraDb11g_home1ClrAgent手动启动,之后我能够正常连接。

So the basic reason was that OraClrAgntisn't running.

所以根本原因是它OraClrAgnt没有运行。

For other reasons you can check this link.

出于其他原因,您可以查看此链接