SSRS:Oracle TNS:侦听器错误?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2274748/
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-18 20:00:33  来源:igfitidea点击:

SSRS: Oracle TNS:listener error?

oraclereporting-servicesora-12514

提问by sanjeev40084

I have a SSRS report which is using Business Object Provider. The dll has a connection with Oracle server. Whenever i run the report i keep on getting this error message:

我有一个使用 Business Object Provider 的 SSRS 报告。该 dll 与 Oracle 服务器有连接。每当我运行报告时,我都会不断收到此错误消息:

"Oracle.DataAccess.Client.OracleException ORA-12514: TNS:listener does not currently know of service requested in connect descriptor "

“Oracle.DataAccess.Client.OracleException ORA-12514: TNS:listener 当前不知道连接描述符中请求的服务”

Anyone knows why?

有谁知道为什么?

回答by Ben

It sounds like you installed the oracle client but have not yet set up your TNS listeners.

听起来您安装了 oracle 客户端,但尚未设置 TNS 侦听器。

There should be a file called "tnsnames.ora" and inside that file you need to add a new listener. If it's a windows install there might also be a network configuration GUI.

应该有一个名为“tnsnames.ora”的文件,在该文件中您需要添加一个新的侦听器。如果是 Windows 安装,可能还有网络配置 GUI。

回答by DCookie

A general tnsnames.ora entry would look like this if you choose to go that way:

如果您选择这样做,一般 tnsnames.ora 条目将如下所示:

DBAlias =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))
    (CONNECT_DATA = (SERVICE_NAME = YourDBServiceName))
  )

Your tnsnames.ora file typically resides in the ORACLE_HOME/network/admin directory.

您的 tnsnames.ora 文件通常位于 ORACLE_HOME/network/admin 目录中。

Technically speaking, you're not "creating a listener", rather, you're defining an alias for an Oracle client network connect string, which will refer toa listener somewhere.

从技术上讲,您不是在“创建侦听器”,而是为 Oracle 客户端网络连接字符串定义别名,该别名将某处引用侦听器。

Alternatively, you can specify an EZConnect string, if you don't want to/can't mess with tnsnames.ora entries:

或者,您可以指定一个 EZConnect 字符串,如果您不想/不能弄乱 tnsnames.ora 条目:

"Data Source=//yourserver:1521/yourDB;User ID=theUser;Password=thePW"

You will need an entry in the sqlnet.ora file to the effect of:

您将需要 sqlnet.ora 文件中的条目来实现:

NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)