使用 OraOLEDB 提供商部署应用程序
我开发了一个使用Delphi 7、ADO和ORACLE的应用程序,我使用的提供程序是OraOLEDB(我需要使用这个提供程序,因为BLOB字段支持)。现在我想与提供商一起分发此应用程序。我在网上搜索下载 Oracle 提供程序,但大小为 174 mb。我需要在所有客户端计算机上安装此文件吗?这个文件有更小的发行版吗?
更新 我正在寻找 OraOLEDB 的轻量级(小型)发行版。
提前致谢。
I developed an application that uses Delphi 7, ADO and ORACLE, the provider I use is OraOLEDB (I need use this provider because the BLOB fields support). now I want to distribute this application with the provider. I search the web to download the Oracle provider, but has a size of 174 mb. I need to install this file on all client machines ? there is a smaller distribution of this file?
UPDATE
i am looking for a lightweigth (small) distribution of the OraOLEDB.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我会选择让用户自己提供客户端库。您可以避免出现以下问题:不同的 Oracle 版本可能存在不同的 Oracle OleDb 版本、许可问题、安装问题等。
据我所知,您需要 170 MB 以上的包。
I would opt to let the user supply it's client library himself. You avoid problems where there might me different oracle OleDb versions for different Oracle versions, licensing issues, installation issues etc. etc.
As fas as I know you need the package of 170 MB+.
似乎分发许可证(http://www.oracle. com/technology/software/popup-license/distribution-license.html),只要您完全遵守该许可证,就可以从该页面重新分发 OleDB 驱动程序。这是官方的 Oracle 发行版 - 通常 Oracle 设置很大 - 如果您不想将它们包含在您的发行介质中,您只需将它们指向下载页面即可。
更新:InstanClient下载页面中有一个较小的软件包,请在此处查找Instant Client Package - ODAC:http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
It seems the distribution license (http://www.oracle.com/technology/software/popup-license/distribution-license.html) from that page allows you to redistribute the OleDB driver as long as you comply fully with that license. That is the official Oracle distribution - usually Oracle setups are large - if you don't want to include them on your distribution media you can simply point them to the download page.
Update: there is a smaller package in the InstanClient download page, look for Instant Client Package - ODAC here: http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
我对安装 OLE DB 提供程序有所了解,但我对 Oracle 提供程序一无所知,因此这可能不切实际。我看到 174MB 的下载内容包含许多驱动程序(ODBC、.NET、OLE DB 等)。我应该可以(但可能在现实世界中没有用)使用必要的文件创建您自己的发行版。 OLE DB 的一大优点是它的安装通常“简单”。运行 regsvr32 /i provider.dll 将会进行必要的注册表更新,以使其在系统上可用。我使用的提供程序不需要像 ODBC 驱动程序通常需要的那样充满注册表命中的存储桶。
因此,您可以创建自己的发行包。 此站点列出了显然是对于提供者来说是必要的。我不知道是否还有其他可能需要的所有 Oracle 客户端工具包通用的“通用”文件(这可能是使这个想法不切实际的部分)。
I know a little bit about installing OLE DB providers, but I do not know anything about the Oracle provider, so this may not be practical. I see that the 174MB download includes a number of drivers (ODBC, .NET, OLE DB, etc.). I should be possible (but maybe not useful in the real world) to create your own distribution with the necessary files. One very nice thing about OLE DB is that it is typically "simple" to install. Running
regsvr32 /i provider.dll
will make the necessary registry updates to make it usable on a system. The providers I have used do not require a bucket full of registry hits like ODBC drivers often need.So it might be possible to create your own distribution package. This site lists the files that are apparently necessary for the provider. I do not know if there are other "generic" files common to all Oracle client kits that might be necessary (that may be the part that would make this idea impractical).
这是为 Oracle 开发时的主要问题,除非您使用 ODAC,它直接连接到oracle,无需在客户端计算机上安装 oracle 客户端。
而且它比使用 ADO 或 OLE DB 提供程序要快得多。
This is the main problem when developing for oracle, except if you use ODAC, which has direct connection to oracle, without installing oracle client on clients' machines.
and it's much faster than using ADO or OLE DB providers.
分发 Oracle 客户端应用程序可能是一场噩梦,当您使用 64 位 Windows 时更是如此。
您需要安装哪个版本的客户端?您的 Delphi 应用程序需要 32 位版本。但如果其他程序确实需要访问 64 位版本怎么办?您需要多个具有重复设置的 ORACLE_HOME,或者强制您的 DotNet 代码在 32 位模式下运行。
我首先写了一个 使用 OleDB 的 Delphi 包装器,然后我意识到使用 Oracle DB 时部署它是多么困难。与您的问题完全相同...
然后我写了一个 专用版本,直接调用OCI库。速度很快(比 OleDB 快 2 到 5 倍),并且易于部署。
您可以使用 Oracle 提供的最新版本的 Oracle Instant Client - 请参阅 此下载链接 - 允许您在不安装标准(大型)Oracle 客户端或拥有 ORACLE_HOME 的情况下运行应用程序。只需将 dll 文件放在与您的应用程序相同的目录中,它就可以工作。
该解决方案的缺点是它与数据库感知组件不兼容。但如果您直接使用 TQuery,然后将结果映射到 Delphi 类中,这可能是一个很好的解决方案。
Distributing Oracle client application can be a nightmare, even more today when you have 64 bit Windows.
Which version of the Client would you have to install? You need a 32 bit version for your Delphi application. But what if other programs do need having access to the 64 bit version? You need several ORACLE_HOME, with duplicated settings, or force you DotNet code to run in 32 bit mode.
I first wrote a Delphi wrapper using OleDB, then I realized how difficult it was to deploy it when using the Oracle DB. The same exact issue as yours...
Then I wrote a dedicated version, calling directly the OCI library. Speed was there (2 to 5 times faster than OleDB), with easy deployment.
You can use the latest version of the Oracle Instant Client provided by Oracle - see this download link - which allows you to run your applications without installing the standard (huge) Oracle client or having an ORACLE_HOME. Just deliver the dll files in the same directory than your application, and it will work.
The drawback of this solution is that it's not compatible with the DB aware components. But if you are using TQuery directly, then map the results in Delphi classes, it could be a great solution.