使用 Sql Server 集成服务连接到 Oracle 数据库

2021-12-30 00:00:00 sql oracle sql-server ssis

我需要使用 SSIS 将数据从 Oracle 数据库获取到 Sql 数据库.

I have a requirement to get the data from Oracle database to Sql Database using the SSIS.

我使用的是 sql Server 2012 Standard Edition 64 位,oracle 是 11g.

I am using sql Server 2012 Standard Edition 64 bit and oracle is 11g.

我尝试下载 oracle 驱动程序(64 位 Oracle 数据访问组件 (ODAC))以安装在 Sql 服务器中,这将允许我连接到 Oracle 数据库,但无法实现相同的目标.

I tried downloading the oracle drivers(64-bit Oracle Data Access Components (ODAC)) to install in Sql server with will allow me to connect to Oracle db but not able to achieve the same.

请帮我解决这个问题.

推荐答案

我不得不多次这样做,不幸的是,在尝试确定您需要什么时,Oracle 网站并不是特别有用.

I have had to do this on many occasions, unfortunately the Oracle website is not particularly helpful when trying to determine what you need.

您需要下载一份ODTwithODAC1120320_32bit.exe"可在以下位置找到:

You need to download a copy of "ODTwithODAC1120320_32bit.exe" which can be found at:

http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html

64 位版本没有用,32 位驱动程序可以正常工作.如果您想从代理运行包,请将其安装在您的开发机器和 SQL Server 机器上.

The 64-bit version is of no use, the 32 bit drivers will work just fine. Install this on your development machine and on the SQL Server box if you want to run the packages from the agent.

然后您可以选择提供程序.Net ProvidersOracleCLient Data Provider".
连接字符串看起来像这样(我认为 1521 是默认的 Oracle 端口):

You can then choose the provider ".Net ProvidersOracleCLient Data Provider".
The connection string will look some like this (I think 1521 is the default Oracle port):

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xxxxx)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xxxxx)))

相关文章