GRANT (Resource pool)
Grants USAGE privileges on resource pools to users and roles.
Grants USAGE privileges on resource pools to users and roles. Users can access their resource pools with ALTER USER or SET SESSION RESOURCE POOL.
Syntax
GRANT USAGE
ON RESOURCE POOL resource-pool[,...]
[FOR SUBCLUSTER subcluster | FOR CURRENT SUBCLUSTER]
TO grantee[,...]
[ WITH GRANT OPTION ]
Parameters
USAGE
- Enables grantees to acess the specified resource pools.
ALL [PRIVILEGES]
- Grants all resource pool privileges that also belong to the grantor. Grantors cannot grant privileges that they themselves lack.
The optional keyword
PRIVILEGES
conforms with the SQL standard. resource-pool
- A resource pool on which to grant the specified privileges.
subcluster
- The subcluster for the resource pool.
grantee
Specifies who is granted privileges, one of the following:
WITH GRANT OPTION
Gives
grantee
the privilege to grant the same privileges to other users or roles, and also revoke them. For details, see Granting privileges.
Privileges
Non-superuser, one of the following:
-
Ownership
-
GRANT OPTION on the object
Examples
Grant user Joe
USAGE privileges on resource pool Joe_pool
.
=> CREATE USER Joe;
CREATE USER
=> CREATE RESOURCE POOL Joe_pool;
CREATE RESOURCE POOL
=> GRANT USAGE ON RESOURCE POOL Joe_pool TO Joe;
GRANT PRIVILEGE
Grant user Joe
USAGE privileges on resource pool Joe_pool
for subcluster sub1
.
=> GRANT USAGE on RESOURCE POOL Joe_pool FOR SUBCLUSTER sub1 TO Joe;
GRANT PRIVILEGE