-- -----------------------------------------------------------------------------------
-- File Name : compile_all_procs.sql
-- Author : Sachchida Ojha
-- Description : Compiles all invalid procedures for specified schema, or all schema.
-- Call Syntax : @compile_all_procs (schema-name or all)
-- Last Modified: 02/28/2005
-- -----------------------------------------------------------------------------------
SET PAGESIZE 0
SET FEEDBACK OFF
SET VERIFY OFF
SPOOL temp.sql
SELECT 'ALTER PROCEDURE ' || a.owner || '.' || a.object_name || ' COMPILE;'
FROM all_objects a
WHERE a.object_type = 'PROCEDURE'
AND a.status = 'INVALID'
AND a.owner = Decode(Upper('&&1'), 'ALL',a.owner, Upper('&&1'));
SPOOL OFF
-- Comment out following line to prevent immediate run
@temp.sql
SET PAGESIZE 14
SET FEEDBACK ON
SET VERIFY ON
Want to post your scripts here in this blog ? Email it to snojha@gmail.com. You will be rewarded for your scripts if selected by our experts.
Wednesday, July 11, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment