This clause indicates that any application context set in namespace is accessible throughout the entire instance. This setting lets multiple sessions share application attributes.

Examples

Creating an Application Context: Example

This example uses a PL/SQL package empno_ctx, which validates and secures the hr application. See Oracle Database Security Guide for the example that creates this application context. The following statement creates the context namespace hr_context and associates it with the package empno_ctx:

CREATE CONTEXT hr_context USING empno_ctx;

You can control data access based on this context using the SYS_CONTEXT function. For example, suppose the empno_ctx package has defined an attribute employee_id as a particular employee identifier. You can secure the base table employees by creating a view that restricts access based on the value of employee_id, as follows: