To find out the user has which privileges in db2 database

74 Views Asked by At

I want to find out users privileges list like which users have execute privileges, which users have admin / insert / update provileges like this.

I got the list of users present in the database from - SELECT * FROM SYSIBMADM.AUTHORIZATIONIDS

But I can't differentiate them on basis of privileges they have

I got the list of users present in the database from -

SELECT * FROM SYSIBMADM.AUTHORIZATIONIDS

But I can't differentiate them on basis of privileges they ha ve

1

There are 1 best solutions below

0
mao On

To learn the details of how Db2-LUW stores database-authorities and user-permissions/privileges, you need to study the many and various catalog views that are in the catalog.

For example, syscat.dbauth, syscat.tabauth, syscat.routineauth etc. (and many more use name matches the pattern %AUTH%).

The documentation explains each of these views, you need to look at views use name matches the pattern %AUTH%.