1-從官網下載instantclient壓縮包;sql
2-解壓目錄,並在根目錄下創建tnsnames.ora文件,內容爲:數據庫
orcl=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST= localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
)
)。服務器
注:orcl爲客戶端鏈接的別名,SERVICE_NAME爲服務器名稱,HOST爲數據庫所在服務器的IP地址。oracle
3-配置環境變量測試
NLS_LANG:SIMPLIFIED CHINESE_CHINA.ZHS16GBKspa
TNS_ADMIN:F:\oracle\ieen\instantclient_11_2cmd
向path添加: F:\oracle\ieen\instantclient_11_2登錄
4-測試客戶端是否可用變量
在cmd命令窗輸入>sqlplus /nolog;(進入oracle命令模式)cli
>conn scott/tiger@orcl;(登陸scott帳號)