Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: EXCEPTION SPOOLING
No, this is untrue.
First of all, there is no reason why this can't be done using simple sqlplus.
Simply make sure echo is off
and feedback is on. Make sure there is a statement
prompt Table xyz
before every create table statement.
Make sure there is a spool command before the operation starts, and this will
be spooled to the file regardless of echo
This is how many Oracle provided dictionary script work.
Then PL/SQL does support spool as long as you do it by using the utl_file
package, it does support host as long you do it by way of the dbms_pipe package, and the dbms_sql package will simply execute ANY pl/sql statement Finally, as you can raise your own exceptions, you can use exceptions to trapstatement errors, no problem.
Regards,
Sybrand Bakker, Oracle DBA
"Oracleguru, Suresh Bhat" wrote:
> Hi -
>
> AFAIK PL/SQL does not support commands like SPOOL, HOST or START that you
> can use in SQL*Plus.
>
> Furthermore, EXCEPTION processing in PL/SQL referes to exceptions because
> of a database operation such as NO_DATA_FOUND, ZERO_DIVIDE etc. and not
> necessarily statement errors that you are after.
>
> Suresh
>
> chandrasekar_at_my-dejanews.com wrote in article
> <7c7r18$c9a$1_at_nnrp1.dejanews.com>...
> > Hi all,
> > I've a reasonable requirement for which I am unable to find a
> solution .
> >
> > Here my problem goes :
> >
> > "I've a create script which creates 75 tables (ALL CREATE STATEMENTS ARE
> GIVEN
> > ONE AFTER OTHER ). Once if I run the script,it should write the errors(if
> any)
> > in a file. I don't want to spool the entire operation . I want to spool
> only
> > the error message(if any) . Is there a way to do this using PL*SQL
> procedures
> > which in turn calls the script and writes the error messages ."
> >
> > ALL YOUR INNOVATIVE IDEAS ARE WELCOME
> >
> > Thankx in advance
> > chandrasekar
> >
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
> >
Received on Tue Mar 16 1999 - 15:00:59 CST