VPD monitoring


The following results in SQL look very confusing:

SQL> conn scott/tiger
SQL> select count(*) from SCOTT.SECURE_EMP;

  COUNT(*)
----------
         7

SQL> conn peter/smith
SQL> select count(*) from SCOTT.SECURE_EMP;

  COUNT(*)
----------
        14

It seems very odd that two queries to the same object give different result sets. The answer (in this case) is that we are using Row Level Security (or Virtual Private Database or Fine Grained Access Control, or whatever Oracle marketing keep coming up with).

But because this facility is a security mechanism, we cannot determine even from 10046 trace files or V$SQL, exactly what has occurred and what the true SQL being processed is.

If you are in a similar quandry, you may wish to play around with event 10730, which is used to dump some of the context and predicate information.