Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle packages invalidating after disabling/enabling constraints

mcpcunhaNov 18 2013 — edited Nov 21 2013

Hi,

I'm getting a problem with my packages...

I've a lot of packages that work together to perform a task.

There is a "main", central package, that coordenates the functions of anothers auxiliary packages. In a certain moment, a lot of INSERTs will be occur in a table. In this moment, there is a function that disables various FKs, constraints and triggers related to the table that will receive the INSERTs, trying acquire better performance.

The problem is that, after the call of this function (and the constraints being disabled), the main package (and others auxiliary packages) turns INVALID... in some time of the processing, errors like these occur:

"ERROR at line 1:

ORA-04045: errors during recompilation/revalidation of

schema.package_01

ORA-04027: self-deadlock during automatic validation for object

schema.package_02

ORA-06508: PL/SQL: could not find program unit being called:

"schema.package_01"

ORA-06512: at "schema.package_03", line 531

ORA-06512: at line 1"

The above error message is clear, something occurs after disabling/enabling the constraints, and the automatic recompilation of Oracle detects the error and fails in the task of recompilation.

I've tried to use the DBMS_UTILITY.COMPILE_SCHEMA( ) Oracle procedure after disabling the constraints, but without success. The above error continues. I've also tried use the DBMS_UTILITY.VALIDATE( ) Oracle procedure in all the packages involved in my process, but again without success. Always, after disabling/enabling the constraints, in some point of the process, this kind of error occurs, and the process is aborted at that session.

Is there anyone that can help me? Thanks...

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2013
Added on Nov 18 2013
10 comments
2,969 views