Skip to content

Instantly share code, notes, and snippets.

@umidjons
Last active February 16, 2024 12:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umidjons/4b5ed06917a0e71e5dd6 to your computer and use it in GitHub Desktop.
Save umidjons/4b5ed06917a0e71e5dd6 to your computer and use it in GitHub Desktop.
Compile package in sqlplus

Compile all objects in schema

EXEC DBMS_UTILITY.compile_schema(schema => 'MYSCHEMA');

Compile package in sqlplus

Compile package header and body with following two statements

alter package my_package compile package;
alter package my_package compile body;

Then check, are there any invalid objects

select object_name from user_objects where status='INVALID';

If there is error, show it with following statement

show errors;

Then we can correct and recompile package, also should check invalid objects again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment