René Nyffenegger's collection of things on the web
René Nyffenegger on Oracle - Most wanted - Feedback -

grant [Oracle SQL]

grant system_privilege to username;
grant system_privilege_1, system_privileges_2, ..,system_privileges_n to username;
grant system_privilege_1 to username with admin option;

grant object_privilege to username;
grant object_privilege to username with grant option;
grant object_privilege to username with hierarchy option;
The SQL command grant allows to assign system privileges and object privileges to users and roles.
For example, granting select and update to a table:
grant select, update on table_foo to user_bar;

grant ... ANY ...

If a privilege is granted on ANY object (grant create any table to some_one), the user (or role) is given this privilege in all schemas, even in schema SYS. In order to prevent this, the initialization parameter o7_dictionary_accessibility must be set to false.

with admin option

If with admin option is specified, the grantee can grant the granted privilege to someone else.

with hierarchy option

This clause only makes sense with the select privilege.

Showing granted privileges for a user

This script allows to recursively list users, their roles and privileges.


List of system privileges (that can be granted).