Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: define priv_type, principal_specification, priv_level, object_type in syntax where needed

...

No Format
GRANT ROLE role_name [, role_name] ...
TO principal_specification [, principal_specification] ...

REVOKE ROLE role_name [, role_name] ...
FROM principal_specification [, principal_specification] ...

principal_specification:
   : USER user
  | GROUP group
  | ROLE role

...

No Format
SHOW ROLE GRANT principal_specification
 
principal_specification:
    USER user
  | GROUP group
  | ROLE role
Info
titleVersion

The output of SHOW ROLE GRANT is in tabular format starting with Hive 0.13.0 (HIVE-6204).

...

No Format
GRANT
    priv_type [(column_list)]
      [, priv_type [(column_list)]] ...
    [ON object_type]
    TO principal_specification [, principal_specification] ...
    [WITH GRANT OPTION]

REVOKE
    priv_type [(column_list)]
      [, priv_type [(column_list)]] ...
    [ON object_type priv_level]
    FROM principal_specification [, principal_specification] ...

REVOKE ALL PRIVILEGES, GRANT OPTION
    FROM user [, user] ...

objectpriv_type:
    ALL TABLE
| ALTER | DATABASE

priv_level:
    db_nameUPDATE | CREATE | DROP
  | tbl_name

Viewing Granted Privileges

INDEX | LOCK | SELECT | SHOW_DATABASE 
 
object_type:
    TABLE
  | DATABASE

priv_level:
    db_name
  | tbl_name
 
principal_specification:
    USER user
  | GROUP group
  | ROLE role

Viewing Granted Privileges

No Format
SHOW GRANT principal_specification
[ON object_type priv_level [(column_list)]]
 
principal_specification:
    USER user
  | GROUP group
  | ROLE role
 
object_type:
    TABLE
  | DATABASE

priv_level:
    db_name
  | tbl_name
No Format
SHOW GRANT principal_specification
[ON object_type priv_level [(column_list)]]
Info
titleVersion

The output of SHOW GRANT is in tabular format starting with Hive 0.13.0 (HIVE-6204).

...