Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: compiling objects
Jim Poe wrote:
> After creating my database, I have objects that did not compile. Can I
> select and compile these objects with sql or pl/sql?
>
> Thanks
>
> --
> Jim Poe (jpoe_at_fulcrumit.com)
Yes. You can use native dynamic SQL in combination with a cursor to get the object_name from DBA_OBJECTS where STATUS = 'INVALID' and OBJECT_TYPE = 'PROCEDURE' and then perform the compile as in:
execute immediate 'alter procedure ' || cursor.object_name || ' compile';
Daniel A. Morgan Received on Thu Jun 07 2001 - 01:09:33 CDT