Detect sqlplus error in dos batch script?

前端 未结 1 754
难免孤独
难免孤独 2021-01-06 04:20

We have the following batch script:

(
echo @release.sql
echo exit
) | sqlplus x/y@orcl

if %errorlevel% gtr 1 goto dberror

Issue is - the s

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-06 05:07

    Take a look at:

    WHENEVER SQLERROR

    http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_twelve052.htm

    WHENEVER OSERROR

    http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_twelve051.htm

    0 讨论(0)
提交回复
热议问题