Grants specific system privileges to users or roles, with or without
administrative rights.
Syntax
GRANT <system_privilege_name [, …]>
TO <userID [, …]>
[ { WITH NO ADMIN | WITH ADMIN [ ONLY ] } OPTION ]
Parameters
(back to top)
- system_privilege_name must be the name of an existing system
privilege.
- userID must be the name of an existing user or
immutable role. The list must consist of existing users with login
passwords. Separate multiple userIDs with commas.
- WITH NO ADMIN OPTION the user can manage the system privilege, but
cannot grant the system privilege to another user.
- WITH ADMIN ONLY OPTION if the WITH ADMIN ONLY OPTION clause is used, each <userID> is
granted administrative privileges over each
<system_privilege>, but not the
<system_privilege> itself.
- WITH ADMIN OPTION each <userID>
is granted administrative privileges over each <system_privilege> in addition to all underlying system
privileges of <system_privilege>.
Examples
(back to top)
- Example 1 grants the DROP CONNECTION system privilege to
Joe with administrative privileges:
GRANT DROP CONNECTION TO Joe WITH ADMIN OPTION
- Example 2 grants the CHECKPOINT system privilege to
Sally with no administrative
privileges:
GRANT CHECKPOINT TO Sally WITH NO ADMIN OPTION
- Example 3 grants the MONITOR system privilege to Jane with administrative privileges only:
GRANT MONITOR TO Jane WITH ADMIN ONLY OPTION
Usage
(back to top)
By default, if no administrative clause is specified in the grant
statement, the WITH NO ADMIN OPTION clause is used.
Permissions
(back to top)
Requires administrative
privilege over the system privilege being granted.