The CLEAR_IDENTIFIER procedure sets the client identifier for the current session to NULL.
This procedure is typically used in conjunction with SET_IDENTIFIER: after a session is identified using SET_IDENTIFIER, middleware or audit logic can track session behavior based on this identifier. When the session ends or tracking is no longer needed, call this procedure to clear the identifier.
Syntax
DBMS_SESSION.CLEAR_IDENTIFIER;
Usage instructions
- This procedure can be executed by
PUBLIC, meaning it can be called by all users. - This procedure only clears the identifier for the current session and does not affect other sessions.
- This procedure does not accept parameters; passing parameters will result in an error.
Examples
Set a session identifier and then clear it.
obclient> CALL DBMS_SESSION.SET_IDENTIFIER('emp_1001');
obclient> CALL DBMS_SESSION.CLEAR_IDENTIFIER;