suppressing messages while running sql queries in a script
You have to add the uppercase S
option to sqlplus
.
The help message (of sqlplus that comes with Oracle 11.2.0.4.0) specifies:
-S Sets silent mode which suppresses the display of the SQL*Plus banner, prompts, and echoing of commands.
With something like
$ sqlplus -S /nolog << EOFconnect user/pswd@databseset serveroutput onset heading offset feedback offexec package.procedure($1); -- procedure that calls DBMS_OUTPUT procedures ...select 2 from dual;-- ...exit;EOF
you only get the output from the DBMS_OUTPUT buffer and the results from select statements.