如何使用 SSIS 连接到 Oracle?我收到错误消息:“tns 侦听器未在 connect_data 中指定 service_name”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13199181/
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
How do I connect to Oracle with SSIS? I am getting the error: "tns listener was not given the service_name in connect_data"
提问by user1603734
I am trying to connect to an Oracle DB through the Oracle Provider for OLE DB in SSIS, but am getting the following error when testing the connection: "tns listener was not given the service_name in connect_data". I am not too familiar with Oracle, so could someone provide me some direction for how to fix this error?
我正在尝试通过 SSIS 中 OLE DB 的 Oracle Provider 连接到 Oracle DB,但在测试连接时出现以下错误:“tns 侦听器未在 connect_data 中提供 service_name”。我对 Oracle 不太熟悉,所以有人可以为我提供一些有关如何修复此错误的指导吗?
回答by rtev
You can add the service name after the host name with a forward slash between them. This has worked in both the Microsoft and Oracle OLE DB providers.
您可以在主机名之后添加服务名称,并在它们之间使用正斜杠。这在 Microsoft 和 Oracle OLE DB 提供程序中都有效。
IP/Service_Name also works, "12.12.123.123/Server1.domain.com"
IP/Service_Name 也有效,“12.12.123.123/Server1.domain.com”
回答by Dominic Goulet
First of all, always use Oracle driver. Not the Microsoft one.
首先,始终使用 Oracle 驱动程序。不是微软的。
Then, when connecting, supply the TNSNAME, USERNAME and PASSWORD to a OLEDB Connection.
然后,在连接时,将 TNSNAME、USERNAME 和 PASSWORD 提供给 OLEDB 连接。
That's all!
就这样!
回答by dhuesca
Ok ok, been here, and this is what works:
好的,好的,来过这里,这是有效的:
You need oracle data access components http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
您需要 oracle 数据访问组件http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
Download the one that applies to you (11g, 12c...) It installs an OLE DB provider which is FAST and also .NET connectors (wich also work really well), so I recommend using OLEDB (also, attunity connector works wonders aswell after you installed ODAC).
下载适用于您的那个 (11g, 12c ...) 它安装了一个 OLE DB 提供程序,它是 FAST 和 .NET 连接器(也很好用),所以我建议使用 OLEDB(此外,attunity 连接器也能产生奇迹安装 ODAC 后)。
Then just connect using ip/service name + credentials, for example
然后只需使用 ip/服务名称 + 凭据进行连接,例如
回答by Ali Emre Can
You need to type "Servername/ServiceName" to Server Name Field .
您需要在 Server Name Field 中输入“Servername/ServiceName”。