The DBMS ALIAS MANAGEMENT privileges

The DBMS privileges for alias management can be granted, denied, or revoked like other privileges. This applies to both local and remote aliases.

For more details about the syntax descriptions, see Reading the administration commands syntax.

Table 1. Alias management privileges command syntax
Command Description
GRANT [IMMUTABLE] CREATE ALIAS
ON DBMS
TO role[, ...]

Enables the specified roles to create new aliases.

GRANT [IMMUTABLE] DROP ALIAS
ON DBMS
TO role[, ...]

Enables the specified roles to delete aliases.

GRANT [IMMUTABLE] ALTER ALIAS
ON DBMS
TO role[, ...]

Enables the specified roles to modify aliases.

GRANT [IMMUTABLE] SHOW ALIAS
ON DBMS
TO role[, ...]

Enables the specified roles to list aliases.

GRANT [IMMUTABLE] ALIAS MANAGEMENT
ON DBMS
TO role[, ...]

Enables the specified roles to list, create, delete, and modify aliases.

Grant privilege to create aliases

You can grant the privilege to create aliases using the CREATE ALIAS privilege.
For example:

GRANT CREATE ALIAS ON DBMS TO aliasAdder;

As a result, the aliasAdder role has privileges that only allow creating aliases. To list all privileges for the role aliasAdder as commands, use the following query:

SHOW ROLE aliasAdder PRIVILEGES AS COMMANDS;
Table 2. Result
command

"GRANT CREATE ALIAS ON DBMS TO `aliasAdder`"

Rows: 1

Grant privilege to delete aliases

You can grant the privilege to delete aliases using the DROP ALIAS privilege.
For example:

GRANT DROP ALIAS ON DBMS TO aliasDropper;

As a result, the aliasDropper role has privileges that only allow deleting aliases. See all privileges for the role aliasDropper as commands, use the following query:

SHOW ROLE aliasDropper PRIVILEGES AS COMMANDS;
Table 3. Result
command

"GRANT DROP ALIAS ON DBMS TO `aliasDropper`"

Rows: 1

Grant privilege to modify aliases

You can grant the privilege to modify aliases using the ALTER ALIAS privilege.
For example:

GRANT ALTER ALIAS ON DBMS TO aliasModifier;

As a result, the aliasModifier role has privileges that only allow modifying aliases. To list all privileges for the role aliasModifier as commands, use the following query:

SHOW ROLE aliasModifier PRIVILEGES AS COMMANDS;
Table 4. Result
command

"GRANT ALTER ALIAS ON DBMS TO `aliasModifier`"

Rows: 1

Grant privilege to list aliases

You can grant the privilege to list aliases using the SHOW ALIAS privilege.
For example:

GRANT SHOW ALIAS ON DBMS TO aliasViewer;

As a result, the aliasViewer role has privileges that only allow modifying aliases. To list all privileges for the role aliasViewer as commands, use the following query:

SHOW ROLE aliasViewer PRIVILEGES AS COMMANDS;
Table 5. Result
command

"GRANT SHOW ALIAS ON DBMS TO `aliasViewer`"

Rows: 1

Grant privilege to manage aliases

You can grant the privilege to create, delete, modify, and list aliases using the ALIAS MANAGEMENT privilege.
For example:

GRANT ALIAS MANAGEMENT ON DBMS TO aliasManager;

As a result, the aliasManager role has all privileges to manage aliases. To list all privileges for the role aliasManager as commands, use the following query:

SHOW ROLE aliasManager PRIVILEGES AS COMMANDS;
Table 6. Result
command

"GRANT ALIAS MANAGEMENT ON DBMS TO `aliasManager`"

Rows: 1