日期:2014-05-16  浏览次数:21032 次

如何连接oracle数据库

在VS的数据连接中,设置好相应的服务器名、用户名及密码,但总会提示需要ORACLE的客户端软件。

直接使用
string connectionString = "Data Source=ora10;Integrated Security=yes;password=shj123;useid=shjseler";
   OracleConnection connection = new OracleConnection(connectionString);
    
   connection.Open();
也是没有反应。
我已在ORACLE下载了ODAC112021Xcopy_x64、ODAC10203x64、instantclient-basic-win-x86-64-11.2.0.1.0、instantclient-basiclite-win-x86-64-11.2.0.1.0。但不知道应如何安装

其中ODAC112021Xcopy_x64有说明以下,但今天上不了ORACLE的官网,所以证实不了是不是要先安装Oracle Universal Installer。
1) The files of this zip file is NOT to be installed on top of an existing 
Oracle Universal Installer (OUI) based Oracle Home installation.

2) After unzipping the files, products must be installed and 
configured by executing the install.bat.
请问应该怎样才能连接到ORACLE 数据库。。(求详解)
(oracle 在远程服务器,我没有权限设置相应的NET系统账户权限。)

------解决方案--------------------
oracle在远程服务器,本地需要安装一个oracle客户端,然后再装odac。首先确保你本地oracle安装成功,能够通过net manager测试连接成功,然后装odac是为了能够在vs中通过C#代码编写数据库连接程序。版本与你本机的操作系统(64位系统就装64位odac)和oracle数据库(11g的就下11g的odac)版本一致。