http://www.oracle.com/technetwork/cn/database/features/instant-client/index-092699-zhs.html
在官网下载对应的 Instant Client 包,解到 C: 。
运行以下批处理,即可。
reg add "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /v ORACLE_HOME /t reg_sz /d "C:instantclient_11_2" /f reg add "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /v TNS_ADMIN /t reg_sz /d "C:instantclient_11_2" /f reg add "HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironment" /v NLS_LANG /t reg_sz /d "SIMPLIFIED CHINESE_CHINA.ZHS16GBK" /f REM tnsnames.ora echo ORALOCAL = >C:instantclient_11_2 nsnames.ora echo (DESCRIPTION = >>C:instantclient_11_2 nsnames.ora echo (ADDRESS_LIST = >>C:instantclient_11_2 nsnames.ora echo (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) >>C:instantclient_11_2 nsnames.ora echo ) >>C:instantclient_11_2 nsnames.ora echo (CONNECT_DATA = >>C:instantclient_11_2 nsnames.ora echo (SERVER = DEDICATED) >>C:instantclient_11_2 nsnames.ora echo (SERVICE_NAME = ORCL) >>C:instantclient_11_2 nsnames.ora echo ) >>C:instantclient_11_2 nsnames.ora echo ) >>C:instantclient_11_2 nsnames.ora
系统环境变量:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSessionManagerEnvironment
用户环境变量:
HKEY_CURRENT_USEREnvironment