The DBMS_UTILITY package has a function called compile_schema that compiles all procedures, functions, packages, and triggers.
EXEC DBMS_UTILITY.compile_schema(schema => 'SCOTT');
You can also use the UTL_RECOMP package, but I haven’t tried that one yet.
With thanks to this ORACLE-BASE article.
Copyright (c) 2024 Michel Hollands