My Oracle Support Banner

VPD Policy Applied To Xmlschema Based Table Causes ORA-22806 with O-R Syntax (Doc ID 761921.1)

Last updated on SEPTEMBER 14, 2021

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 10.2 to 11.1]
Information in this document applies to any platform.
This problem can occur on any platform.


You have a table with XMLTYPE columns and also a VPD Policy applied to it, for example:

CREATE TABLE test_tab (
n1 integer not null,
x1 xmltype,
constraint pk_test_tab primary key (n1)
xmltype column x1
store as object relational
xmlschema "&v_schema" element "a"

The following query will error out:

select a.x1.xmldata."b" from test_tab a
ERROR at line 1:
ORA-22806: not an object or REF


You have added a VPD policy to this table using DBMS_RLD.ADD_POLICY.


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

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