Forum OpenACS Improvement Proposals (TIPs): Re: TIP 65: (proposed) Modify APM to recompile busted Oracle PACKAGE and PACKAGE BODY objects after upgrade

You do not need to write any script to recompile broken PL/SQL, because one (or more) already exists, and has been discussed here many times over the years.