Life is a journey

Who Dares Wins
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Start Oracle Sqlplus with Login Information Script

Posted on 2010-11-09 14:29  zhaobin  阅读(209)  评论(0编辑  收藏  举报

Save the following text into a ".bat" file

d:
cd D:\Corporate\Project\Build

if "%2"=="UAT" goto CONNECT_UAT

:CONNECT_UAT
if "%1"=="cps1" goto CONNECT_UAT_CPS1
if "%1"=="cps2" goto CONNECT_UAT_CPS2

 
:CONNECT_UAT_CPS1
sqlplus cps1/password@CPS%2
goto End


:CONNECT_UAT_CPS2
sqlplus cps2/password@CPS%2
goto End


:END
pause