12c: Select count(*) from table fails with ORA-28112: failed to execute policy function (Doc ID 2217601.1)

Last updated on DECEMBER 28, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.

Symptoms

After enabling the FGA policy , commands and failing with following errors.

SQL> select count(*) from Test;
  *
Error at line 1
ORA-28112: failed to execute policy function


10046 trace is showing the following errors:

*** 2016-12-22 15:53:11.435
WAIT #140593380206992: nam='SQL*Net message from client' ela= 15724506 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=280234746918
CLOSE #140593380206992:c=0,e=11,dep=0,type=1,tim=280234747010
FGA: Query parsing returned with error# 936
FGA: Current Query is SELECT "QUEUE_ENTRY_ID","QUEUE_NAME","QUEUE_ENTRY","SDS_INSTANCE_ID","DATE_ENTERED","REDELIVER_DATE","REDELIVER_COUNT" FROM "SRTEST"."NC_JMSQUEUE" "NC_JMSQUEUE" WHERE SYS_AUDIT((CASE WHEN(INSERT,UPDATE,DELETE) THEN 1 ELSE NULL END), 'SRTEST','NC_JMSQUEUE', 'COGNOS_POLICY2',3 ) IS NULL
FGA: Actual Query is SELECT "QUEUE_ENTRY_ID","QUEUE_NAME","QUEUE_ENTRY","SDS_INSTANCE_ID","DATE_ENTERED","REDELIVER_DATE","REDELIVER_COUNT" FROM "SRTEST"."NC_JMSQUEUE" "NC_JMSQUEUE" WHERE SYS_AUDIT((CASE WHEN(INSERT,UPDATE,DELETE) THEN 1 ELSE NULL END), 'SRTEST','NC_JMSQUEUE', 'COGNOS_POLICY2',3 ) IS NULL
=====================
PARSE ERROR #140593380441064:len=33 dep=0 uid=89 oct=3 lid=89 tim=280234747270 err=28112
select count(*) from NC_JMSQUEUE
WAIT #140593380441064: nam='SQL*Net break/reset to client' ela= 4 driver id=1650815232 break?=1 p3=0 obj#=-1 tim=280234747340
WAIT #140593380441064: nam='SQL*Net break/reset to client' ela= 132 driver id=1650815232 break?=0 p3=0 obj#=-1 tim=280234747478
WAIT #140593380441064: nam='SQL*Net message to client' ela= 0 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=280234747503

 

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms