Search:
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




After Work

Highlife Adventures
The best club in Chicago
for Chicago Singles is Highlife Adventures!


Jersey Girl Shirts
Are you looking for a
Jersey Girl T-Shirt ?



Kyoto Sushi
in Chicago, on Lincoln Ave.
Moody's Pub
in Chicago, has great burgers
Skylark
in Chicago, on Halsted .. excellent Friday fish fry!


Oracle » PL-SQL » Procedures » Invalid-Fix-Rec

Oracle Procedures : Fixing Invalid Objects

     



Procedures can become invalid if tables are changed or moved. Here's a nice
proc which finds the invalid items and attempts to fix them. P_print
is a proc which accesses the dbms.print system proc.





CREATE OR REPLACE PROCEDURE P_fix_bad_objects
IS
CURSOR program_units IS
SELECT object_name, object_type
FROM user_objects
WHERE object_type IN
('PROCEDURE','FUNCTION','PACKAGE', 'PACKAGE BODY', 'TRIGGER')
AND object_name <> 'TEST' and status = 'INVALID' ;
BEGIN
FOR x IN program_units LOOP
P_print ( x.object_name ) ;
DBMS_DDL.ALTER_COMPILE (x.object_type,'SCOTT',x.object_name);
END LOOP;
END;









Oracle : Related Topics


Sybase Web Site
Sybase Mobile Web Site
Oracle Web Site





Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2008 Citisoft Inc All Rights Reserved.