脚本组件缺少oracle参考 [英] script component missing oracle reference
问题描述
我尝试使用脚本组件并将一些数据插入Oracle数据库,但是我遇到以下问题.
I try to use script component and insert some data to Oracle database but I face with below issue.
无法加载文件或程序集'Oracle.ManagedDataAccess, 版本= 4.122.1.0,文化=中性,PublicKeyToken = 89b483f429c47342' 或其依赖项之一.系统找不到指定的文件.
Could not load file or assembly 'Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.
在ScriptMain.Input0_ProcessInputRow(Input0Buffer Row)在 UserComponent.Input0_ProcessInput(Input0Buffer Buffer)位于 UserComponent.ProcessInput(Int32 InputID,String InputName, PipelineBuffer Buffer,OutputNameMap OutputMap)位于 Microsoft.SqlServer.Dts.Pipeline.ScriptComponent.ProcessInput(Int32 InputID,PipelineBuffer缓冲区)位于 Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID,PipelineBuffer缓冲区)
at ScriptMain.Input0_ProcessInputRow(Input0Buffer Row) at UserComponent.Input0_ProcessInput(Input0Buffer Buffer) at UserComponent.ProcessInput(Int32 InputID, String InputName, PipelineBuffer Buffer, OutputNameMap OutputMap) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponent.ProcessInput(Int32 InputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
在谷歌搜索之后,我认为我的问题应该与此问题相同.从以下位置复制Oracle.ManagedDataAccess.dll C:\ Program Files(x86)\ Oracle开发人员工具VS2017 \ odp.net \ managed \ common \ Oracle.ManagedDataAccess.dll
after googling, I thought my problem should be same as this issue. I copy the Oracle.ManagedDataAccess.dll from C:\Program Files (x86)\Oracle Developer Tools for VS2017\odp.net\managed\common\Oracle.ManagedDataAccess.dll
到
C:\ Windows \ assembly
C:\Windows\assembly
或
C:\ Windows \ assembly \ GAC
C:\Windows\assembly\GAC
如上一个链接中所述.但是我再次面临着同样的问题.你介意告诉我我错过了什么吗?
as adviced in the previous link. but again I face with the same issue. would you mind advising me did I miss any part?
我正在使用SSIS2017.
I am using SSIS2017.
推荐答案
那是错误的,您不应该将文件手动复制到C:\Windows\assembly
.请注意,从.NET Framework 4开始,全局程序集缓存的默认位置为%windir%\Microsoft.NET\assembly
That is wrong, you should not copy files manually to C:\Windows\assembly
. Just a note, starting with the .NET Framework 4, the default location for the Global Assembly Cache is %windir%\Microsoft.NET\assembly
- 您可以将DLL复制到应用程序可执行文件的文件夹中.
- 或将其添加到GAC(全局程序集缓存).这是通过 gacutil.exe .我假设每个安装工具还提供了添加到GAC"选项.您还可以使用
...\odp.net\managed\x64\OraProvCfg.exe
和/或...\odp.net\managed\x86\OraProvCfg.exe
. - 还有更多可以放置DLL的位置(请参见
- Either you copy the DLL to folder of your application executable.
- Or add it to GAC (Global Assembly Cache). This is done with tool gacutil.exe. I assume every Setup-Tool also provides an option "Add to GAC". You can also use
...\odp.net\managed\x64\OraProvCfg.exe
and/or...\odp.net\managed\x86\OraProvCfg.exe
for it. - There are a few more locations where you can put the DLL (see Probing the Application Base and Culture Directories), however the application's root directory is the standard.
这篇关于脚本组件缺少oracle参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!