Oleksii Nikulin
Oleksii Nikulin

Reputation: 73

SAP HANA DB user-role check

How can I check my user-role in HANA DB with a help of SAP HANA Database Explorer?

Upvotes: 0

Views: 5121

Answers (1)

Lars Br.
Lars Br.

Reputation: 10388

The question is ambiguous as multiple role-concepts apply when using the SAP HANA Database Explorer.

The application "Database Explorer" is governed by XSA roles/role collections. There is no way for the user to find out what role collections are assigned, without using the appropriate administration apps (for which the user, in turn, needs the relevant permissions).

The database (schema)-access of the user depends on

  • the database logon used for the database connection
  • the roles/privileges assigned to that database logon

Both of these aspects can usually be checked (if not explicitly restricted) with SQL queries like these:

select * from GRANTED_ROLES where GRANTEE = current_user for direct role assignments

or

select * from EFFECTIVE_ROLES where GRANTEE = current_user for all role assignments, including nested roles.

Similar views exist for the privileges that are contained in the views.

Upvotes: 2

Related Questions