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

Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlplus and stdout... SEEING WHAT RAN??

Re: sqlplus and stdout... SEEING WHAT RAN??

From: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: Fri, 13 May 2005 20:27:48 +0100
Message-ID: <QUsxG+B0+PhCFwI2@jimsmith.demon.co.uk>


In message <1115994066.089071.132150_at_g49g2000cwa.googlegroups.com>, jason_at_cyberpine.com writes
>Good day.
>
>What's the best way to see what sqlplus commands were executed in a
>script output? I've tried ECHO ON and SET SERVEROUTPUT ON in my POSIX
>script, but neither show me the commands executed as they are
>excecuted...
>
>
>the POSIX script:
>
># Simple Appworx Demo Job
># Author Juan Pineiro
>set -x
>echo on
>pwd
>id
>sqlplus<<!eof
>user1/pw1_at_db1
>SET ECHO ON
>SET SERVEROUTPUT ON
>desc table1;
>exit
>!eof
>
>

You want SET TERMOUT ON, not SERVEROUTPUT

>The script output captured by my scheduler:
>
>+ echo on
>on
>+ pwd
>/dir1/run
>+ id
>uid=119(user1) gid=111(xxx) groups=106(yyy)
>+ sqlplus
>+ 0< /var/tmp/sh25073.1
>
>SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 13 10:13:38 2005
>
>Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
>
>Enter user-name:
>Connected to:
>Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
>With the Partitioning, OLAP and Oracle Data Mining options
>JServer Release 9.2.0.5.0 - Production
>
>SQL> SQL> SQL> Name Null? Type
> ----------------------------------------- --------
>----------------------------
> f1 NOT NULL NUMBER(10)
> f2 NOT NULL NUMBER(10)
> f3 NOT NULL NUMBER(10)
>
>SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.5.0 -
>64bit Production
>With the Partitioning, OLAP and Oracle Data Mining options
>JServer Release 9.2.0.5.0 - Production
>
>
>What Id like to see in this above output is :
>
>desc table1;
>

set echo on causes sqlplus to display sql statements, not sqlplus commands.

desc is a sqlplus command and won't be displayed, but select, insert etc will be.

-- 
Jim Smith
Because of their persistent net abuse, I ignore mail from
these domains (among others) .yahoo.com .hotmail.com .kr .cn .tw
For an explanation see <http://www.jimsmith.demon.co.uk/spam>
Received on Fri May 13 2005 - 14:27:48 CDT

Original text of this message

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