do a 'prompt select count(*) from psoprdefn_tmp;'
That should put it in the file...
>From: Tom Smith <[Email Address Removed] "LazyDBA.com Discussion" <[Email Address Removed] Re: echo on does not work from a shell script
>Date: Fri, 29 Mar 2002 04:38:33 -0800 (PST)
>
>I am on AIx 4.3.3 with Oracle 8.1.7
>
>
>--- Denny Koovakattu <[Email Address Removed] wrote:
> >
> > Sorry. I didn't pay attention to the question. I
> > just tested your example and could not reproduce the
> > problem. Which platform and version of Oracle are
> > you
> > testing this ? I tested this on HP-UX 11.0 running
> > 8.1.6.x
> >
> > Regards,
> > Denny
> >
> > --- Tom Smith <[Email Address Removed] wrote:
> > > Yes, I am running a sql file from SQLPLUS.
> > >
> > > TOm
> > >
> > > --- Denny Koovakattu <[Email Address Removed] wrote:
> > > > Hi,
> > > >
> > > > set echo on works only when running a SQL file
> > .
> > > >
> > > > Regards,
> > > > Denny
> > > >
> > > > --- Tom Smith <[Email Address Removed] wrote:
> > > > > When I call sqlplus script from a shell
> > script,
> > > > the
> > > > > set echo on command does not work.
> > > > >
> > > > > For example, I have the following shell script
> > > > > -------------------------------
> > > > > #!/usr/bin/ksh
> > > > > #test.sh
> > > > >
> > > > > sqlplus scott/[Email Address Removed] > > > > @junk.sql
> > > > > EOF
> > > > > -------
> > > > >
> > > > > junk.sql looks like this:
> > > > >
> > > > > spool junk.lst
> > > > > set echo on
> > > > > select count(*) from psoprdefn_tmp;
> > > > > spool off
> > > > > ------------------
> > > > >
> > > > > When I run the shell script, it does not print
> > > the
> > > > > "select count(*) from psoprdefn_tmp; " in the
> > > > > junk.lst
> > > > > file.
> > > > >
> > > > > But if I run the script like the following, it
> > > > > prints
> > > > > the SQL command:
> > > > >
> > > > > sqlplus scott/[Email Address Removed] @Junk.sql
> > > > >
> > > > > Could somebody help me with this:
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Tom
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Movies - coverage of the 74th Academy Awards®
> > http://movies.yahoo.com/
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Greetings - send holiday greetings for Easter, Passover
>http://greetings.yahoo.com/
>
>--------
>Oracle documentation is here:
>http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
>To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
>Tell yer mates about http://www.farAwayJobs.com
>By using this list you agree to these
>terms:http://www.lazydba.com/legal.html
>
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
Oracle LazyDBA home page