VPD - Policy Types - Dynamic - Context_Sensitive
670770Jul 16 2009 — edited Jul 16 2009Hello,
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