想要连接Oracle服务器必须安装Oracle客户端,Oracle客户端分两种,一种是免安装的,体积较小,直接解压后使用,一种是需要安装的,体积较大,500多MB,建议大家都用下面的百度云盘安装,装32位的,64位的不建议安装,因为和plsql不太兼容。下面分别进行简单介绍:
1、免安装客户端instant-client(百度云盘地址:http://pan.baidu.com/s/1dFxDo45)
(1)将所有压缩包解压到你想要放置的文件夹,同一个文件夹,尽量不要有中文路径,这些文件大概主要2包含以下:
instantclient-basic-win32-11.2.0.1.0.zip
instantclient-sqlplus-win32-11.2.0.1.0.zip
instantclient-odbc-win32-11.2.0.1.0.zip
instantclient-jdbc-win32-11.2.0.1.0.zip
set ORACLE_HOME=E:\app\Administrator\product\instantclient_10_2
set TNS_ADMIN=E:\app\Administrator\product\instantclient_10_2
set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
(2)在OracleInstantClient_11_2目录下新建一个txt文件,更名为tnsnames.ora,注意txt后缀变成了ora,加入以下内容,只有最后一个ORCC的内容是必需的:
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DA
1、免安装客户端instant-client(百度云盘地址:http://pan.baidu.com/s/1dFxDo45)
(1)将所有压缩包解压到你想要放置的文件夹,同一个文件夹,尽量不要有中文路径,这些文件大概主要2包含以下:
instantclient-basic-win32-11.2.0.1.0.zip
instantclient-sqlplus-win32-11.2.0.1.0.zip
instantclient-odbc-win32-11.2.0.1.0.zip
instantclient-jdbc-win32-11.2.0.1.0.zip
有些不是必须的,但建议你还是保留着。
下面设置环境变量,注意改成你自己的安装路径:
set path=E:\app\Administrator\product\instantclient_10_2set ORACLE_HOME=E:\app\Administrator\product\instantclient_10_2
set TNS_ADMIN=E:\app\Administrator\product\instantclient_10_2
set NLS_LANG=AMERICAN_AMERICA.AL32UTF8
(2)在OracleInstantClient_11_2目录下新建一个txt文件,更名为tnsnames.ora,注意txt后缀变成了ora,加入以下内容,只有最后一个ORCC的内容是必需的:
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DA