前端之家收集整理的这篇文章主要介绍了
Oracle环境变量设置,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
::oracle system environment,no space block
@echo off
::关于如果出现空格字符需要用双引号
echo "设置TNS_ADMIN"
:: modify these value of TNS_ADMIN_env,ORACLE_HOME_env & LD_LIBRARY_PATH_env
set TNS_ADMIN_env="c:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN"
:: defalut appended to path when installed
set ORACLE_HOME_env="c:\app\Administrator\product\11.2.0\dbhome_1"
:: default set
set NLS_LANG_env=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
set reg_path=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
@reg add "%reg_path%" /v ORACLE_HOME /t reg_expand_sz /d "%ORACLE_HOME_env%" /f
@reg add "%reg_path%" /v TNS_ADMIN /t reg_expand_sz /d "%TNS_ADMIN_env%" /f
@reg add "%reg_path%" /v NLS_LANG /t reg_expand_sz /d "%NLS_LANG_env%" /f
:: arcgis sde
set LD_LIBRARY_PATH_env="C:\Program Files (x86)\ArcGIS\instantclient_10_2"
@reg add "%reg_path%" /v path /t reg_expand_sz /d ".;%path%;%LD_LIBRARY_PATH_env%" /f
echo "查看变量是否设置成功"
echo %ORACLE_HOME%
echo %TNS_ADMIN%
echo %NLS_LANG%
echo %PATH%
pause