PLSQL连接32位Oracle客户端(环境变量配置)
1.下载oracle简易版客户端 或instantclient
2.解压到指定目录(自己定)
3.环境变量配置
变量名:
TNS_ADMIN
变量值:
D:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
(安装目录即可)
变量名:
NLS_LANG
变量值:
AMERICAN_AMERICA.ZHS16GBK
4.配置PL/SQL
进入页面后选择tools-->preferences
Oracle Home和OCI libarary如下:
Oracle Home:
D:\oracle\product\10.2.0\client_1\(你的安装路径)
![](https://img2020.cnblogs.com/blog/1923331/202106/1923331-20210629123330671-430321012.png)
OCI : D:\oracle\product\10.2.0\client_1\
oci.dll (加上oci.dll)
oci.dll (加上oci.dll)
![](https://img2020.cnblogs.com/blog/1923331/202106/1923331-20210629123422641-1327672430.png)
Apply-->OK
5.配置Oracle客户端
建一个
tnsnames.ora
文件,然后向文件中添加如下内容:(具体根据自己的主机和端口配置)
该文件放在oracle安装目录下:d:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
tnsnames.ora
文件,然后向文件中添加如下内容:(具体根据自己的主机和端口配置)
该文件放在oracle安装目录下:d:\oracle\product\10.2.0\client_1\NETWORK\ADMIN
格式如下
s1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora9)
)
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora9)
)
)