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: Display shell script output

Re: Display shell script output

From: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Sat, 15 Jul 2006 16:55:21 +0200
Message-ID: <004c01c6a81e$b4883b30$3308310a@ETNOTEAM6XUQ9V>


> I need to be able to see commands executed on the sceen - they are not
> echoed now:

Shell or sqlplus commands?

For shell use

#!/bin/ksh -v (to print shell input lines as they are read or -x if you need to print the commands and their arguments, or -xv for both)

For sqlplus:

From SQL*Plus User's Guide and Reference:

SET ECHO {ON | OFF}
Controls whether or not to echo commands in a script that is executed with @, @@ or START. ON displays the commands on screen. OFF suppresses the display. ECHO does not affect the display of commands you enter interactively or redirect to SQL*Plus from the operating system.

So you could:

  1. Write a sql sqlript and then run it in the shell script as @script.
  2. Prompt the commands:

#!/bin/ksh
sqlplus system/password<< EOF
set echo on
set termout on
set feedback on
prompt Create user test1 identified by test prompt default tablespace rcvcat_tbs
prompt duota 0 on system;
Create user test1 identified by test
default tablespace users
quota 0 on system;
exit;
EOF Dimitre

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Jul 15 2006 - 09:55:21 CDT

Original text of this message

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