Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Suppress the output of CONNECT command

Sreekanth MunagalaSep 13 2011 — edited Sep 14 2011
Dear Friends,
Below is the code in of the shell scripts.
In the shell script,i connect to database to fetch the current SID.
There is no problem in connecting and fetching the SID value. But when i display the value of ORACLE_SID parameter, the value is "Connected. DEV".
My question here is how to supress the text "Connected." from the output i.e. the output of ORACLE_SID should be "DEV"
I have tried by giving "SET TERMOUT OFF" but it is not working.
I would like to know if there is a way to achieve this?
ORACLE_SID=`sqlplus -s /nolog << EOF
connect $SQL_LOGIN_PASSWD
set serveroutput on size 100000
set heading off
set pagesize 0
set feedback off
select upper(name) from $TABLE; 
exit
EOF`
Regards,
Sreekanth
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2011
Added on Sep 13 2011
9 comments
509 views