Was this helpful?
SESSION_PRIV Function
The SESSION_PRIV function determines whether the current session has a subject privilege, or can request it.
This function has the following format:
SESSION_PRIV('subject_priv')
where subject_priv is any single subject privilege name, such as operator, specified as a text string in upper or lower case. Valid subject privileges are listed under CREATE PROFILE on page 531.
The following values are returned:
Y
Indicates session has privilege.
N
Indicates session does not have the privilege.
R
Indicates the session can request the privilege and make it active.
Example—The following checks whether the current session has auditor privilege:
SELECT SESSION_PRIV('AUDITOR');
Last modified date: 04/03/2024