简体   繁体   English

我的服务器上没有Oracle客户端,但bin目录中没有Oracle.dll

[英]No Oracle client on my server but an Oracle.dll in my bin directory

This is a really dumb question. 这是一个非常愚蠢的问题。 But I have a hard time with Oracle and it's .net setup. 但是我很难用Oracle和它的.net设置。 But, I don't have an Oracle client on my server (Oracle 11g). 但是,我的服务器(Oracle 11g)上没有Oracle客户端。 I do have the ODP.net dll in my bin and lib folders (probably don't need it in both, but it seems to work for now). 我的bin和lib文件夹中有ODP.net dll(可能在两者中都不需要它,但它现在似乎有效)。 I am currently getting this exception... 我目前正在接受这个例外......

    Oracle.DataAccess.Client.OracleException: The provider is not compatible with the     version of Oracle client
    at Oracle.DataAccess.Client.OracleInit.Initialize()
    at Oracle.DataAccess.Client.OracleConnection..cctor()...

Now I suspect this exception is occuring because I don't have a client on my server... (I have this service on another server that does have a client on it). 现在我怀疑发生了这个异常,因为我的服务器上没有客户端...(我在另一台服务器上有这个服务,并且有一个客户端)。 I don't recall this much trouble working with sql server. 我不记得使用sql server这么麻烦了。 But my question is, to access a database (Oracle in this case) programatically in .NET do you need both a client and the appropriate dll? 但我的问题是,要在.NET中以编程方式访问数据库(在本例中为Oracle),您是否需要客户端和相应的dll?

是的,在大多数情况下,您确实需要客户端软件。

Unlike SQL Server ADO.Net providers which is completely managed code the ODP.Net assemblies are built on top of native Oracle client libraries. 与完全托管代码的SQL Server ADO.Net提供程序不同,ODP.Net程序集构建在本机Oracle客户端库之上。 What we do is use the ODP.Net xcopy deployment to install it on the servers. 我们所做的是使用ODP.Net xcopy部署将其安装在服务器上。 This is relatively simple to do compared to a full oracle client deplyment. 与完整的oracle客户端部署相比,这相对简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM