Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL*Plus question - a bit urgent - Can we suppress 'Connected.' message?

RE: SQL*Plus question - a bit urgent - Can we suppress 'Connected.' message?

From: Charu Joshi <joshic_at_mahindrabt.com>
Date: Wed, 05 Nov 2003 06:09:25 -0800
Message-ID: <F001.005D5A97.20031105060925@fatcity.com>


Thanks Stephane,

Your solution 3 has done the job for me.

Regards,
Charu.

-----Original Message-----
Stephane Faroult
Sent: 05 November 2003 18:10
To: Multiple recipients of list ORACLE-L 'Connected.' message?

You have multiple solutions; one would be to use an externally identified Oracle account; another one to use the hide.c program (should find it with google) to prevent people from seeing command arguments through 'ps'; another one to write something such as

myvar=`echo "your stuff here

             blabla
             exit" | sqlplus -s /nolog | grep -iv connected`

. just a few ideas.

HTH SF

>----- ------- Original Message ------- -----
>From: "Charu Joshi" <joshic_at_mahindrabt.com>
>To: Multiple recipients of list ORACLE-L
><ORACLE-L_at_fatcity.com>
>Sent: Wed, 05 Nov 2003 04:04:38
>
>Hello all,
>
>I am calling SQL*Plus from a unix shell script and
>storing the
>results of the query executed in a shell variable.
>It goes like
>this:
>
>FL_SUFFIX=`sqlplus -s /nolog <<EndOfSQL
> SET ECHO OFF
> SET FEEDBACK OFF
> SET VERIFY OFF
> SET PAGESIZE 0
>
> CONN $ORA_ID/$ORA_PASS
>
> SELECT dummy FROM dual; -- Dummy query..
>unrelated to
>the question.
>
> EXIT SQL.SQLCODE
>
>EndOfSQL`
>
>But the contents of the FL_SUFFIX are 'Connected.'
>instead of the
>value returned by the query.
>
>This is obviously because of the 'CONN
>$ORA_ID/$ORA_PASS'
>statement. Is there a way to suppress the
>'Connected.' message
>that comes on connecting to database?
>
>I have thought about 2 solutions:
>
>1. Use sqlplus -s $ORA_ID/$ORA_PASS :- This would
>be the last
>alternative in case everything else fails ..
>obviously from
>security point of view.
>
>2. Create a .sql script as:
>
>SET ECHO OFF
>SET FEEDBACK OFF
>SET VERIFY OFF
>SET PAGESIZE 0
>
>SET TERMOUT OFF -- The important bits.
>SPOOL /dev/null --
>CONN $ORA_ID/$ORA_PASS
>SPOOL OFF --
>SET TERMOUT ON -- The important bits.
>
>SELECT dummy FROM dual; -- Dummy query.
>
>EXIT SQL.SQLCODE
>
>and then call this script as
>
>FL_SUFFIX=`sqlplus -s /nolog @a.sql`
>
>I think solution 2 will work, but I am loathe to
>writing a script
>for a single SQL statement unless there is no other
>way.
>
>Any new ideas would be greatly appreciated, the
>quicker the
>better.
>
>Thanks & regards,
>Charu.
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriolecorp.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

*********************************************************
Disclaimer

This message (including any attachments) contains 
confidential information intended for a specific 
individual and purpose, and is protected by law. 
If you are not the intended recipient, you should 
delete this message and are hereby notified that 
any disclosure, copying, or distribution of this
message, or the taking of any action based on it, 
is strictly prohibited.

*********************************************************

Visit us at http://www.mahindrabt.com


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Charu Joshi
  INET: joshic_at_mahindrabt.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Nov 05 2003 - 08:09:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US