Skip to content

GRANT Privileges to User using DQL

Below are Privileges which can be used in the query

  • SUPERUSER
  • SYSADMIN
  • CREATE TYPE
  • CREATE CABINET
  • CREATE GROUP
  • CONFIG AUDIT
  • PURGE AUDIT
  • VIEW AUDIT

 

Syntax

GRANT <PRIVILEGES> TO <USER NAME>,<USER NAME>

or 

GRANT <PRIVILEGES>,<PRIVILEGES> TO <USER NAME>,<USER NAME>

or 

GRANT <PRIVILEGES> TO (<QUERY>)

or 

GRANT <PRIVILEGES>,<PRIVILEGES> TO (<QUERY>)

 

 

Example

Below is the query to give “CREATE TYPE” privileges to user.

GRANT CREATE TYPE TO DCTMAdmin

or

GRANT CREATE TYPE TO (select user_name from dm_user where user_login_name = 'dctmadmin')

 

 

Grant..jpeg

 

 

Example

Below is the query to give “CREATE TYPE” and “CREATE GROUP” privileges to user.

GRANT CREATE TYPE,CREATE GROUP TO DCTMAdmin

or

GRANT CREATE TYPE,CREATE GROUP TO (select user_name from dm_user where user_login_name = 'dctmadmin')

 

Grant2.jpeg

 

Published inDQL