below 8.0: // this is legacy code and is missing data but 7.x db2 is old and unsupported at this point.
SELECT DISTINCT grantee FROM syscat.indexauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.packageauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.passthruauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.routineauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.schemaauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.sequenceauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.tbspaceauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.colauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.dbauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.indexauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.packageauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.passthruauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.routineauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.schemaauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.sequenceauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.tabauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.tbspaceauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.libraryauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.xsrobjectauth WHERE granteetype = 'G'
9.5 -> below 9.7:
SELECT DISTINCT grantee FROM syscat.colauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.dbauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.indexauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.packageauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.passthruauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.roleauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.routineauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.schemaauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.sequenceauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.tabauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.tbspaceauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.libraryauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.variableauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.workloadauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.xsrobjectauth WHERE granteetype = 'G'
9.7 and greater:
SELECT DISTINCT grantee FROM syscat.colauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.dbauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.indexauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.packageauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.passthruauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.moduleauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.roleauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.routineauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.schemaauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.sequenceauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.tabauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.tbspaceauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.libraryauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.variableauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.workloadauth WHERE granteetype = 'G' UNION
SELECT DISTINCT grantee FROM syscat.xsrobjectauth WHERE granteetype = 'G'