Limitations of Privileges and Roles: Stored PL/SQL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Roles are disabled when stored procedures or packages are executed.
A user executing a procedure or package can perform actions against objects
(select a table, select a view, create a table, create a view, create a trigger).
When the necessary privileges are granted to this user indirectly via a role,
the result is ORA-00942 or ORA-01933 or ORA-01031 and ORA-06512 or PLS-00201 and
ORA-06550.
These actions are successfull when the necessary privileges are granted directly
to the user.
This means that the user executing the procedure or package should be granted
the privileges nequired to perform the actions against objects directly.
A user cannot acquire a privilege via a role if he needs that privilege when
executing a stored procedure or function or package.
If the user issues the same statements in SQL, it works as the user can use the
privileges granted via a role.
Partager