从shell脚本调用.sql文件时,会检索所需的数据,但在完成后会显示以下错误。
WHENEVER: not found.
SET: not found.
SET: not found.
SET: not found.
运行命令
sqlplus -s user/pasd@oracle_sid @file.sql
file.sql
WHENEVER SQLERROR EXIT 1
SET TERMOUT OFF
SET ECHO OFF
SET EMBEDDED ON
SET FEEDBACK OFF
SET HEADING OFF
spool file.log
select 'xyz' from dual;
spool off;
exit;