Oracle 11g 客户端配置
Windows下Oracle 11G -?ODAC 11.2
Release 3 安装配置
?
-
下载Oracle 11G客户端工具
:ODAC 11.2 Release 3 (11.2.0.2.1) with Oracle Developer
Tools for Visual Studio
,已包含的组件:
- Oracle Developer Tools for
Visual Studio 11.2.0.2.0
- Oracle Data Provider for .NET 4
11.2.0.2.0
?
- Oracle Data Provider for .NET
2.0 11.2.0.2.0
?
- Oracle Providers for ASP.NET 4
11.2.0.2.0
?
- Oracle Providers for ASP.NET
2.0 11.2.0.2.0
?
- Oracle Database Extensions for
.NET 4 11.2.0.2.0 -- for upgrade only
?
- Oracle Database Extensions for
.NET 2.0 11.2.0.2.0 -- for upgrade only
?
- Oracle Provider for OLE DB
11.2.0.2.0
?
- Oracle Objects for OLE
11.2.0.2.0
?
- Oracle Services for Microsoft
Transaction Server 11.2.0.2.0
?
- Oracle ODBC Driver
11.2.0.2.0
?
- Oracle SQL*Plus
11.2.0.2.0
?
- Oracle Instant Client
11.2.0.2.0
-
解压到临时文件夹,再双击setup.exe执行安装,假设安装在:D:\app\wiflish\product\11.2.0\client_1目录下,安装过程略;
-
设定环境变量:
ORACLE_HOME=D:\app\wiflish\product\11.2.0\client_1
TNS_ADMIN=D:\app\wiflish\product\11.2.0\client_1
NLS_LANG=SIMPLIFIED
CHINESE_CHINA.AL32UTF8,注:语言编码要与Oracle服务器设置的一致,可以通过 select userenv('language')
from dual; 查询服务器的语言编码;
-
配置tnsnames.ora文件,在D:\app\wiflish\product\11.2.0\client_1\Network\Admin\目录下,新建tnsnames.ora文件,内容如下:
ORCL
=
? (DESCRIPTION =
??? (ADDRESS_LIST =
????? (ADDRESS = (PROTOCOL =
TCP)(HOST = 192.168.1.3)(PORT = 1521))
??? )
??? (CONNECT_DATA =
?????
(SID = ORCL)
????? (SERVER = DEDICATED)
??? )
? )
其中:第一个ORCL为数据库实例名;192.168.1.3为Oracle数据库服务器地址;SID =
ORCL为Oracle数据库服务器中安装是的SID。
-
使用客户端连接工具如PLSQL Developer
连接测试,输入用户名和密码,连接成功;
-
Oracle的Instant Client的即时客户端连接工具的配置方式类似,将配置目录修改为Instant
Client的解压目录;