15.3 Drop a Custom End-User Context
Use the DROP END USER CONTEXT command to remove a custom
end-user context definition from the database.
After a context is dropped, the definition is no longer available for
instantiation in future sessions. Attribute values stored in existing sessions are
unaffected until the session is detached or recreated.
Required privilege
- To drop an end-user context in the executing user's own schema, no privilege is required.
- The
DROP ANY END USER CONTEXTsystem privilege to drop an end-user context in any schema.
Syntax
DROP END USER CONTEXT [IF EXISTS] [schema.]name;
Parameters
| Parameter | Description |
|---|---|
|
|
The schema (owner) name of the end-user context to be dropped. If omitted, the current schema is used. |
|
|
The name of the end-user context definition to drop. |
Usage notes and restrictions
- When
IF EXISTSis specified:- If the context does not exist, the statement is a no-op. No error is raised.
- If the context exists, it is dropped.
- When
IF EXISTSis omitted:- If the context does not exist, an error is raised.
- If the context exists, it is dropped.
For syntax diagrams and additional details, see DROP END USER CONTEXT in Oracle AI Database SQL Language Reference.
Example 15-4 Drop an end-user context
DROP END USER CONTEXT hr.hcm_context;
-- Drop only if the context exists (no error if absent):
DROP END USER CONTEXT IF EXISTS hr.hcm_context;