I have the following code:
sqlplus web/%password%@%SID% @ web.sql > weblog.log < NUL
if %ERRORLEVEL% > 0 GOTO SQLERROR
:SQLERROR
echo wrong credentials
The problem is, when I give wrong SID or password it pauses for some seconds and does not go to the error. Any help? Thanks.
-lflag make it behave how you want it to?.