到Oracle官網下載Oracle Instant Client,注意選擇x86平臺,Toad只認32位的Oracle Instant Client。至於版本號,沒有特別要求,版本向下兼容。sql
桌面上,右鍵點「個人電腦」,選擇「屬性」,選擇「高級」頁中的「環境變量」,在系統變量中,修改以下this
變量名:ORACLE_HOME
變量值:D:\Program Files\instantclient_11_2
變量名:TNS_ADMIN
變量值:D:\Program Files\instantclient_11_2
變量名:NLS_LANG
變量值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK
修改Path變量,在後面添加 D:\Program Files\instantclient_11_2spa
在D:\Program Files\instantclient_11_2新建一個文本文件,文件名爲tnsnames.ora和sqlnet.ora
it
#orcl能夠自定義替換
#HOST修改成Oracle Server地址
#SERVICE_NAME修改成Oracle實例名
orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.30.85)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)io
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES = (all)
#NAMES.DIRECTORY_PATH= (EZCONNECT)
NAMES.DIRECTORY_PATH= (TNSNAMES)
變量