0
votes

I try to use script component and insert some data to Oracle database but I face with below issue.

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.


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)

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

to

C:\Windows\assembly

or

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?

I am using SSIS2017.

1

1 Answers

1
votes

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

  • 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.