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

Home -> Community -> Usenet -> c.d.o.server -> Re: EXCEPTION SPOOLING

Re: EXCEPTION SPOOLING

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 16 Mar 1999 22:00:59 +0100
Message-ID: <36EEC68A.9E36F775@sybrandb.demon.nl>


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 trap
statement errors, no problem.
Also you could use the format_call_stack function from the dbms_utility package anywhere.
I would recommend reading Oracle PL/SQL programming by Steven Feuerstein, published by O'Reilly to both of you, or better to anyone. I will refrain from commenting on the email-address of the original poster, though it does.. (Yes!) I will postpone that to the next time he posts replies which are so blatantly incorrect and show his ignorance. I have 10 years experience and I don't advertise myself as 'guru'. Sorry, I really don't want to insult you, but a bit more modesty may suit you better. I know I'm not the first to send such a flame to you, and I saw how you replied. A few more IMOs and there would have been 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

Original text of this message

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