Skip to Main Content

Oracle Database Discussions

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.

VPD - Policy Types - Dynamic - Context_Sensitive

670770Jul 16 2009 — edited Jul 16 2009
Hello,

can someone explain me the differences between the policy type dynamic and context_sensitive

The explanation from the oracle manuals:

CONTEXT_SENSITIVE
Server re-evaluates the policy function at statement execution time if it detects context changes since the last use of the cursor. For session pooling where multiple clients share a database session, the middle tier must reset context during client switches. Note that the server does not cache the value returned by the function for this policy type; it always executes the policy function on statement parsing. Applies to only one object.

DYNAMIC
The default policy type. Server assumes the predicate may be affected by any system or session environment at any time, and so always reexecutes the policy function on each statement parsing or execution. Applies to only one object.

In "CONTEXT_SENSITIVE" the policy function is executed on parsing and is executed again if the session context has changed between parsing and before execution.
Me understandig is that in "DYNAMIC" the polcy function is executed on parsing and execution time.

Is it possible that a session context can change between parsing and execution. The statements are serialized and a session context change could not happen between parsing and execution of a select-statement for example..
In this case I don't understand why two polciy types exist which have the same effects.

Regards
Michael
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2009
Added on Jul 16 2009
4 comments
753 views