Skip to content

ON SYSTEM

Syntax

GRANT { CREATE ROLE | ALTER ANY ROLE | DROP ANY ROLE | CREATE DATABASE | RESTORE ANY DATABASE } [, ...] | ALL [ PRIVILEGES ] }
   ON SYSTEM
   TO { role_specification } [, ...] [ WITH GRANT OPTION ]

Parameters

ON SYSTEM
Grant privileges system-wide, not on specific databases or objects.
CREATE ROLE
Privilege to create roles.
ALTER ANY ROLE
Privilege to alter any role.
DROP ANY ROLE
Privilege to drop any role.
CREATE DATABASE
Privilege to create databases.
RESTORE ANY DATABASE
Privilege to restore any database (using ybrestore).

See also HAS_SYSTEM_PRIVILEGE.

Examples

Grant system-wide role privileges to user yb100:

premdb=# grant create role, alter any role, drop any role on system to yb100;
GRANT

Grant the privilege to restore any database on the system to two users:

premdb=# grant restore any database on system to restore1, restore2;
GRANT

Parent topic:GRANT