oracle之客户端配置
1.拷贝客户端文件
拷贝instantclient_11_2文件夹至某目录 我这里直接放在d盘为例
2.配置客户端的环境变量
TNS_ADMIN
D:\instantclient_11_2
3.配置sid文件
instantclient_11_2/tnsnames.ora
其中第一个dev名称是本地的名称
第二个dev则是远程数据上的实例必须匹配
dev =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.3.3.2oracle账号43)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = dev)
)
)
www.2cto.com
4.tnsping
Ping远程的oracle数据库实例 其中ais192为本地的实例名称
[quee@localhost ~]$ tnsping ais192
TNS Ping Utility for Linux: Version 10.2.0.1.0 – Production on 12-OCT-2012 15:25:15
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/home/quee/oracle/product/10.2.0/db_4/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ais192)))
OK (10 msec)