Oracle Contexts
Version 19c

General Information
Library Note Morgan's Library Page Header
ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling complimentary technical Workshops on Database Security for the first 30 Oracle Database customers located in North America that send an email to asra_us@oracle.com. Request a Workshop for your organization today.
Dependencies
ALL_CONTEXT DBA_CONTEXT SESSION_CONTEXT
CDB_CONTEXT GLOBAL_CONTEXT V$CONTEXT
CONTEXT$   CDB_GLOBAL_CONTEXT
CONTEXT
CONTEXT_V2
GV$GLOBALCONTEXT
INT$DBA_CONTEXT
I_CONTEXT
KU$_CONTEXT_T
KU$_CONTEXT_VIEW
SEMCONTEXT
USER_POLICY_CONTEXTS
V$GLOBALCONTEXT
VALIDATE_CONTEXT
 
Create Context
Create local context CREATE OR REPLACE CONTEXT <context_name> USING <plsql_package_name>;
CREATE OR REPLACE CONTEXT otp USING dbms_otp;

col schema format a30
col package format a30

SELECT *
FROM context$
WHERE package = 'DBMS_OTP';

   OBJ# SCHEMA                         PACKAGE        FLAGS
------- ------------------------------ ------------- ------
  76296 SYS                            DBMS_OTP           0
Create global context CREATE OR REPLACE CONTEXT <context_name> USING <plsql_package_name> ACCESSED GLOBALLY;
CREATE OR REPLACE CONTEXT otp USING dbms_otp ACCESSED GLOBALLY;

col schema format a30
col package format a30

SELECT *
FROM context$
WHERE package = 'DBMS_OTP';

   OBJ# SCHEMA                         PACKAGE        FLAGS
------- ------------------------------ ------------- ------
  76297 SYS                            DBMS_OTP           2
 
Drop Context
Drop Context drop context <context_name>;
drop context otp;

Related Topics
Advanced Queueing (DBMS_AQ)
Advanced Queueing (DBMS_AQADM)
DBMS_APPLICATION_INFO
DBMS_LOGSTDBY_CONTEXT
DBMS_RLS
DBMS_SESSION
DBMS_WM
Fine Grained Access Control
SYS_CONTEXT
System Privileges
Virtual Private Database
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2022 Daniel A. Morgan All Rights Reserved
  DBSecWorx