Oracle.DataAccess.Client 依赖项 [英] Oracle.DataAccess.Client Dependencies

查看:48
本文介绍了Oracle.DataAccess.Client 依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我想使用Oracle.DataAccess.dll来使用OracleBulkCopy.

我想知道我需要能够从数据库读取然后在 Oracle 中执行批量复制的所有 dll.目前,我们只使用一个 dll 来执行从数据库的所有读取,我们使用 Oracle.ManagedDataAccess.Client.但我不能用它来执行批量复制.

我不想为用户安装ODP.NET,我想直接在程序中包含dll.所以我想知道能够在 32 位和 64 位中使用 Oracle.DataAccess.dll 所需的最低 dll.

我知道有一些关于此的旧帖子,但它很旧,而且列出的 dll 已过时.我无法找到其中一些.

我为 ODAC12 安装了 ODP.net,并检索了此

UPD:ODP.NET 提供程序的最新版本(下载自 这里) 有19"后缀而不是12"在他们的文件名中:

<块引用>

  1. oci.dll

  2. ociw32.dll

  3. orannzsbb19.dll

  4. oraociei19.dll

  5. oraons.dll

  6. OraOps19.dll

  7. Oracle.DataAccess.dll

First of all, I want to use the Oracle.DataAccess.dll to use OracleBulkCopy.

I want to know all the dlls that I need to be able to read from a database and then perform a bulkcopy in Oracle. Currently, we are using only one dll to perform all the reads from databases, we are using Oracle.ManagedDataAccess.Client. But I can't use it to perform a bulkCopy.

I don't want to install ODP.NET for the users, I want to include the dll directly in the program. So I want to know the minimum required dlls to be able to use the Oracle.DataAccess.dll in 32bit and in 64bit.

I know that there are some old post about this, but it's quiet old and the listed dlls are out of date. I can't event find some of them.

I installed the ODP.net for ODAC12 and I retreived all the listed dlls in this post. I also tried with with this post. The listed dlls are pointing out the version 11.

I made a dummy project that opens a connection, reads a table and bulk it in another table. I copied the listed dlls from the posts in the root of the project and I included Oracle.DataAccess.dll in the project.

When I run my program in 64 bit I get the following error:

Could not load file or assembly 'Oracle.DataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'

When I run it in 32 bit, I get this error:

Unable to load DLL 'OraOps12.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

The dlls that I included are:

  • oci.dll
  • ociw32.dll
  • Oracle.DataAccess.dll
  • orannzsbb12.dll
  • oraocci12.dll
  • oraociei12.dll
  • OraOps12.dll

解决方案

I managed to make it work.

  • Download the good version of the ODAC that will target your project.

  1. For a 32bit project you need to download the ODAC12..._x32.zip (ODAC121021Xcopy_32bit.zip).

  2. For the 64bit project you need to download the ODAC12..._x64.zip

  • Unzip it in an empty folder depending on the version you want (32bit vs 64bit).

  • Locate in the instantclient_12_1 folder all the dlls by searching *.dll in the windows search bar. You need to grab:

  1. oci.dll

  2. ociw32.dll

  3. orannzsbb12.dll

  4. oraociei12.dll

  5. oraons.dll

  • Locate in the odp.net4 or odp.net20 folder depending on your .NET version this two dlls:

  1. OraOps12.dll

  2. Oracle.DataAccess.dll

  • Copy the those 32bit dlls or 64bit dlls and put them directly in the Output path of your project. For example in C:...vsProjectsBulkInsertBulkInsertinDebug.

  • Browse Oracle.DataAccess.dll in your project by pointing on the Output path.

UPD: recent versions of the ODP.NET provider (downloaded from here) have "19" suffix instead of "12" in their filenames:

  1. oci.dll

  2. ociw32.dll

  3. orannzsbb19.dll

  4. oraociei19.dll

  5. oraons.dll

  6. OraOps19.dll

  7. Oracle.DataAccess.dll

这篇关于Oracle.DataAccess.Client 依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆