Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Display shell script output
Ordinary spool works fine.
On 7/15/06, Radoulov, Dimitre <cichomitiko_at_gmail.com> wrote:
>
> > 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
>
-- Regards, Ranko Mosic Contract Senior Oracle DBA B. Eng, Oracle 10g, 9i Certified Database Professional Phone: 416-450-2785 email: mosicr_at_rogers.com http://ca.geocities.com/mosicr@rogers.com/ContractSeniorOracleDBARankoMosicMain.html -- http://www.freelists.org/webpage/oracle-lReceived on Sat Jul 15 2006 - 16:51:20 CDT
![]() |
![]() |