My Oracle Support Banner

Foreign Key Constraint Check While Inserting Fires The Select VPD Policy On the Parent Table When OLS is installed (Doc ID 467464.1)

Last updated on MAY 21, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.1 to 11.2.0.4 [Release 9.2 to 11.2]
Information in this document applies to any platform.

Symptoms

On systems where OLS is installed the constraint check fires the SELECT VPD policy defined on the parent table, this may result in unexpected error ORA-28117 "integrity constraint violated - parent record not found" .

 Create the policy function and the tables :


After searching within v$SQLAREA with SQL_ID, following SQLs were found: 

02b8139tjanr9 = INSERT INTO T1(NPKID) VALUES (1001) 
9k2u3b033rb0z = INSERT INTO T2(NPKID, NFKID) VALUES (2002, 1001) 

 

Changes

 Differences in behaviouir are typically seen between systems where VPD policies exist on table with FK constraints and only some have OLS installed.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.