Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: cleanup the user_errors view
Hi!
I don't recommend messing up with the system tables and views directly. the view USER_ERRORS contains the error messages for invalid objects. if you want to remove entries in this view, why not try dropping the invalid objects?
HTH,
Romel M. Tungol
Gert Rijs wrote in message <01bd8478$dc01f660$0100007f_at_gertrijs>...
>Hi,
>
>Short version:
>How do i empty the user_errors view?
>'Delete from user_errors' is not always possible.
>
>Background:
>From within a (C++/OCI) program of mine i create several packages not known
>to my program at compile time.
>After each 'CREATE OR REPLACE' i check the oci return-code and bail out
>when the create fails. If the create succeeds there is still a possibility
>that the package is not usable (if you would create it in sql*plus it would
>say: 'Warning: Package created with compilation errors.'), so i check the
>view (synonym?) USER_ERRORS for messages (like sql*plus SHOW ERROR).
>
>The Problem:
>user_errors accumulates errors.
>if i execute the following:
> create package foo is bbbbb; end;
> select * from user_errors;
>there will be 1 row selected (PLS-00103: Encountered the symbol ";"...)
>if i then execute:
> create package bar is bbbbb; end;
> select * from user_errors;
>there will be 2 rows (one for FOO, one for BAR).
>I just want the 'BAR' message to show up after the second 'create'.
>
>My first attempt was to issue a 'DELETE FROM USER_ERRORS' before each
>create, but not all users have the required privileges (for example
>scott/tiger lacks it).
>I would rather not parse the create statement myself to get the
>package-name.
>Anyone knows a way to cleanup user_errors?
>
>--
>reply address is altered to keep the spam down
>remove the nospamplease part to reply...
>Gert Rijs
>gem at wirehub.nl
>www.wirehub.nl/~gem
>
Received on Thu May 21 1998 - 02:41:26 CDT