GRANT (Resource Pool)

Grants privileges on resource pools to users and roles. After granted usage rights, users can access the resource pool with ALTER USER or SET SESSION RESOURCE POOL.

Syntax

GRANT privilege
   ON RESOURCE POOL resource-pool[,…]
   TO grantee[,…] 
   [ WITH GRANT OPTION ]

Parameters

privilege

One of the following:

  • USAGE
  • 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.

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. For details, see How to Grant Privileges in the Administrator's Guide.

Privileges

One of the following:

  • Superuser
  • Privileges grantee who was given the option (WITH GRANT OPTION) of extending these privileges to other users

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

See Also