SET TERMOUT OFF will do the job, but only if it is inside a SQL script.
So this will work:
echo "set pages 0 feedback off heads off echo off TERMOUT off" >> ${sql_v}
echo "spool Tmp/db.lst" >> ${sql_v}
echo "select distinct db_name from my_table order by 1;" >> ${sql_v}
echo "spool off " >> ${sql_v}
echo "exit; " >> ${sql_v}
sqlplus -s $MY_DB_CONNECT @${sql_v}
But this will NOT work:
sqlplus -s $MY_DB_CONNECT << ENDofSql1
set pages 0 feedback off heads off echo off TERM OFF
select distinct db_name from my_table order by ENV_CODE;
exit
ENDofSql1
I thought of mentioning this, since it can be frustrating at times...
No comments:
Post a Comment