Hitachi

Hitachi Advanced Database Setup and Operation Guide


11.7.2 Checking the user privileges and schema operation privilege granted to an HADB user

To check which user privileges and schema operation privilege have been granted to an HADB user, search the SQL_USERS dictionary table.

An HADB user who has the DBA privilege can check the user privileges and schema operation privilege that all HADB users have. An HADB user who does not have the DBA privilege can check only his or her own user privileges and schema operation privilege (the privileges of the HADB user with the authorization identifier that was used for the current connection to the HADB server).

The following is an example of checking the user privileges and schema operation privilege that are granted to HADB users.

Specification example

An HADB user who has the DBA privilege and CONNECT privilege checks the user privileges and schema operation privilege granted to all created HADB users.

SELECT "USER_NAME","DBA_PRIVILEGE","CONNECT_PRIVILEGE","SCHEMA_PRIVILEGE"
  FROM "MASTER"."SQL_USERS"

If Y is specified for "DBA_PRIVILEGE", "CONNECT_PRIVILEGE", and "SCHEMA_PRIVILEGE" in the search result, the HADB user has the corresponding user privileges and schema operation privilege. If N is displayed, the HADB user does not have the corresponding user privileges and schema operation privilege.

For details about dictionary table SQL_USERS, see B.13 Content of SQL_USERS.