# Oracle 客户端免安装配置
1、 oracle11g http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=1511607
❤解压instantclient-basic-win32-11.2.0.1.0.zip得到文件夹instantclient_11_2
❤将文件夹放到c盘根目录:C:\instantclient_11_2
❤在此目录中创建admin文件夹C:\instantclient_11_2\admin
❤在admin下添加文件:tnsnames.ora
tnsnames.ora内容:
#TNSNAMES.ORA Network Configuration File: D:\oracle\ora92\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
红色部分根据实际情况修改。
❤配置环境变量:
a:新建TNS_ADMIN 值:C:\instantclient_11_2\admin
否则:报TNS错误
b: 新建NLS_LANG 值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK (注:中文简体),否则出现????
c: 修改path ,在原来的基础上增加C:\instantclient_11_2;
❤解压instantclient-sqlplus-win32-11.2.0.1.0.zip到C:\instantclient_11_2(即把压缩包里的内容放到C:\instantclient_11_2)
❤测试:
打开cmd
输入 sqlplus system/《自己设置的密码》@ORCL
结果如下:(成功)