Question

do you know query how to get list of privileges for user or for session in DB2? Some similar to Oracle query:

​select * from session_privs;​

Thanks, Vaclav

Was it helpful?

Solution

In db2 you can use the table function: AUTH_LIST_AUTHORITIES_FOR_AUTHID

select authority, d_user, d_group, d_public, role_group, role_user, role_public, d_role
from table (sysproc.auth_list_authorities_for_authid ('sapbw','U')) as t
order by authority"

For more information: http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.sql.rtn.doc/doc/r0052898.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top