SQLPLUS辅助bat

 @echo on
if "%OS%" == "Windows_NT" SETLOCAL

REM **************************************************
REM notify:
REM   LOGIN_USR:UserName To LoginIn
REM   LOGIN_PWD: PassWord Of User   
REM   DNS:       DataBase Net Service Name
REM   HOST: DataBase Server Name Or IP
REM   PORT: DataBase Server Port
REM   SERVICE_NAME: DataBase Service Name
REM **************************************************

SET LOGIN_USR=***
SET LOGIN_PWD=***
SET DNS=***
SET HOST=***
SET PORT=***
SET SERVICE_NAME=***

if not "%DNS%"=="" goto connect

SET DNS=//%HOST%:%PORT%/%SERVICE_NAME%

:connect
sqlplus  %LOGIN_USR%/%LOGIN_PWD%@%DNS%
pause
:end

你可能感兴趣的:(批处理)