- 论坛徽章:
- 0
|
我的机器就装了v8与v9,切换需要更改一些path的,写了2个批处理做这个事情:
db2v8:
rem -----------------------------------------------------------------------
rem setting DB2 v8 environment
rem -----------------------------------------------------------------------
set CLASSPATH=.;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cisuz.jar;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\common.jar
set DB2INSTANCE=db2
set DB2PATH=C:\Program Files\IBM\SQLLIB
set DB2TEMPDIR=C:\PROGRA~1\IBM\SQLLIB\
set INCLUDE=C:\PROGRA~1\IBM\SQLLIB\INCLUDE;C:\PROGRA~1\IBM\SQLLIB\LIB
set LIB=;C:\PROGRA~1\IBM\SQLLIB\LIB
set Path=C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\Infoprint Select;c:\Program Files\IBM\Personal Communications\;c:\Program Files\IBM\Trace Facility\;C:\Notes;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;D:\WORK\Test\explain plan
db2v9:
rem -----------------------------------------------------------------------
rem setting DB2 v9 environment
rem -----------------------------------------------------------------------
set CLASSPATH=.;C:\PROGRA~1\IBM\SQLLIB_01\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB_01\java\db2jcc.jar;C:\PROGRA~1\IBM\SQLLIB_01\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB_01\java\db2jcc_license_cisuz.jar;C:\PROGRA~1\IBM\SQLLIB_01\java\db2jcc_license_cu.jar;C:\PROGRA~1\IBM\SQLLIB_01\bin;C:\PROGRA~1\IBM\SQLLIB_01\java\common.jar
set DB2INSTANCE=db2_01
set DB2PATH=C:\Program Files\IBM\SQLLIB_01
set DB2TEMPDIR=C:\PROGRA~1\IBM\SQLLIB_01\
set INCLUDE=C:\PROGRA~1\IBM\SQLLIB_01\INCLUDE;C:\PROGRA~1\IBM\SQLLIB_01\LIB
set LIB=;C:\PROGRA~1\IBM\SQLLIB_01\LIB
set Path=C:\PROGRAM FILES\THINKPAD\UTILITIES;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\Infoprint Select;c:\Program Files\IBM\Personal Communications\;c:\Program Files\IBM\Trace Facility\;C:\Notes;C:\PROGRA~1\IBM\SQLLIB_01\BIN;C:\PROGRA~1\IBM\SQLLIB_01\FUNCTION;C:\PROGRA~1\IBM\SQLLIB_01\SAMPLES\REPL;D:\WORK\Test\explain plan
在命令行下只要运行下批处理就可以切换不同版本了,比较方便。
可以只看数据库相关的路径,其他个人机器设置的路径忽略。。。
[ 本帖最后由 vlife 于 2007-8-24 17:35 编辑 ] |
|