ORA_CHECK_PRIVILEGE Function
The ORA_CHECK_PRIVILEGE function checks whether the specified privileges have been granted to an application user. If the specified privileges have been granted to the application user, ORA_CHECK_PRIVILEGE returns 1. This function only works for system privileges, such as CREATE_SESSION. If the system privileges are not granted to the application user, then it returns 0.
Syntax
ORA_CHECK_PRIVILEGE(
(privs IN VARCHAR(128))+)
return NUMBER;
Parameters
| Parameter | Description |
|---|---|
privs |
The privilege names being checked. The maximum number of privileges allowed is 100. |
Examples
The following example uses ORA_CHECK_PRIVILEGE to check whether the application user has been granted the CREATE_SESSION system privilege.
SELECT ORA_CHECK_PRIVILEGE('CREATE_SESSION') FROM DUAL;