将 C# 连接到 Oracle 数据库所需的最小客户端占用空间是多少? [英] What is the minimum client footprint required to connect C# to an Oracle database?

查看:27
本文介绍了将 C# 连接到 Oracle 数据库所需的最小客户端占用空间是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过在我的笔记本电脑上下载并安装客户端管理工具和 Visual Studio 2008,我已成功从 C# (Visual Studio 2008) 连接到 Oracle 数据库 (10g).

I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008) by downloading and installing the client administration tools and Visual Studio 2008 on my laptop.

Oracle 客户端工具的安装占用空间超过 200Mb,而且相当冗长.

The installation footprint for Oracle Client tools was over 200Mb, and quite long winded.

有谁知道最小可行的足迹是多少?我希望它是一个单独的 DLL 和一个注册命令,但我感觉我需要安装一个 oracle home,并设置各种环境变量.

Does anyone know what the minimum workable footprint is? I am hoping that it's a single DLL and a register command, but I have the feeling I need to install an oracle home, and set various environment variables.

我在我的代码中使用 Oracle.DataAccess.

I am using Oracle.DataAccess in my code.

推荐答案

您需要一个 Oracle 客户端来连接到 Oracle 数据库.最简单的方法是安装 Oracle 数据访问组件.

You need an Oracle Client to connect to an Oracle database. The easiest way is to install the Oracle Data Access Components.

为了尽量减少占用空间,我建议如下:

To minimize the footprint, I suggest the following :

  • 使用 Microsoft 的 Oracle 提供程序 (System.Data.OracleClient),它随框架一起提供.
  • 下载 Oracle Instant Client 包- 基本精简版:这是一个(几乎)最低要求的 zip 文件.我推荐 10.2.0.4 版本,它比 11.1.0.6.0 版本小很多.
  • 在特定文件夹中解压缩以下文件:
    • v10 :
      • oci.dll
      • orannzsbb10.dll
      • oraociicus10.dll
      • Use the Microsoft provider for Oracle (System.Data.OracleClient), which ships with the framework.
      • Download the Oracle Instant Client Package - Basic Lite : this is a zip file with (almost) the bare minimum. I recommend version 10.2.0.4, which is much smaller than version 11.1.0.6.0.
      • Unzip the following files in a specific folder :
        • v10 :
          • oci.dll
          • orannzsbb10.dll
          • oraociicus10.dll
          • oci.dll
          • orannzsbb11.dll
          • oraociei11.dll

          这大约为 19Mb (v10).

          This amounts to about 19Mb (v10).

          如果您不关心在多个应用程序之间共享此文件夹,另一种方法是将上述 DLL 与您的应用程序二进制文件一起发送,并跳过 PATH 设置步骤.

          If you do not care about sharing this folder between several applications, an alternative would be to ship the above mentioned DLLs along with your application binaries, and skip the PATH setting step.

          如果您绝对需要使用 Oracle 提供程序 (Oracle.DataAccess),您将需要:

          If you absolutely need to use the Oracle provider (Oracle.DataAccess), you will need :

          • ODP .NET 11.1.0.6.20(据称与 Instant Client 配合使用的第一个版本).
          • 显然是 Instant Client 11.1.0.6.0.

          请注意,我还没有测试过这个最新配置...

          Note that I haven't tested this latest configuration...

          这篇关于将 C# 连接到 Oracle 数据库所需的最小客户端占用空间是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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