我一直在尝试使用以下连接字符串连接到 Oracle 服务器:
OracleConnection conn = new OracleConnection();
conn.ConnectionString = @"Data Source=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.206.0.23)(PORT = 1521))
)
(CONNECT_DATA =
(SID = ORCLWEX3)
)
)
;User Id= RAMNIVAS_CI;Password= RAMNIVAS_CI;Persist Security Info=True;";
conn.Open();
但得到以下错误:
System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
虽然我已经安装了。
我已经能够使用 Oracle Sql Developer 连接到该服务器。设置是:
TNSNAMES 文件是这样的:
# tnsnames.ora Network Configuration File: F:\app1\product\11.1.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCLWEX1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle-db.newvisionsoftware.com)(PORT = 1521))
)
(CONNECT_DATA =
(SID = ORCLWEX1)
)
)
ORCLWEX2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle-db2.newvisionsoftware.com)(PORT = 1521))
)
(CONNECT_DATA =
(SID = ORCLWEX2)
)
)
ORCLWEX3 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.206.0.23)(PORT = 1521))
)
(CONNECT_DATA =
(SID = ORCLWEX3)
)
)
我被告知要使用最后一个:ORACLEWEX3。
我知道连接字符串中存在一些问题,如果有人可以帮助我,我将不胜感激。