RT,以下是部分代码:- :create1
- set /p ORA_SID=Please enter the ORACLE_SID:
- @echo.
- set /p pass=Please enter the password:
- @echo.
- sqlplus sys/%pass%@%ORA_SID% as sysdba @%p%/get_rebuild.sql>nul
- for /f "usebackq" %%b in (`sed -n "/.trc/p" C:\gettrc.txt`) do (set var=%%b)
- if exist "%var%" (
- echo Get the control file rebuild scripts from the %ORA_SID% successfully ! &echo.
- )else(
- echo Get the control file rebuild scripts from the %ORA_SID% failed ! &echo.
- echo Please re-enter the "ORACLE_SID" or verify the database status is normal ! &echo.
- goto create1
- )
- goto create2
复制代码 目的是登录Oracle数据库后获取某个文件。
问题:当实例或者密码输入错误后,脚本会卡在登录那个阶段,errorlevel也没有返回值,此时该怎样跳过这条命令继续执行? |