Retrieving all authorization IDs or roles with the DBADM and system DBADM authorities

You can retrieve all authorization IDs or roles that have the DBADM and system DBADM authorities.

About this task

Issue the following statement to retrieve all authorization IDs or roles that have the DBADM authority:

Begin general-use programming interface information.
SELECT DISTINCT GRANTEE
  FROM SYSIBM.SYSDBAUTH
  WHERE DBADMAUTH <>' ' AND GRANTEETYPE IN (' ','L');

Issue the following statement to retrieve all authorization IDs or roles that have the system DBADM authority on specific databases in the Db2 system:

SELECT DISTINCT GRANTEE
  FROM SYSIBM.SYSUSERAUTH
  WHERE SDBADMAUTH <>' ' AND GRANTEETYPE IN (' ','L'); 
End general-use programming interface information.