How to get list of Db2 users from user groups?
On Db2 v11.1 Linux I can get the list of groups a user belongs to:
db2 "SELECT * FROM TABLE (SYSPROC.AUTH_LIST_GROUPS_FOR_AUTHID('MYUSER'))"
How to get vice-versa, list of users that belongs to specific group?
Regards
Group membership is managed externally to Db2-server.
Because of that, all the members of a group might not be known to Db2, but Db2 will have a way to test if a specific user is a member of a specific group.
In your case this is either in linux or (if configured) an identity-management toolset/LDAP/Active-Directory etc.
For the simplest case on linux, look in /etc/groups
, or use local tooling to list group memberships.