DB2: list of users in current database with few of their authorities.
select authid as username,
case bindaddauth when 'Y' then 1 else 0 end as bindadd,
case connectauth when 'Y' then 1 else 0 end as connect,
case createtabauth when 'Y' then 1 else 0 end as create_tab,
case dbadmauth when 'Y' then 1 else 0 end as dbadm,
case externalroutineauth when 'Y' then 1 else 0 end as ext_routine,
case implschemaauth when 'Y' then 1 else 0 end as implschema,
case loadauth when 'Y' then 1 else 0 end as load,
case nofenceauth when 'Y' then 1 else 0 end as nofence,
case quiesceconnectauth when 'Y' then 1 else 0 end as quiesceconn,
case securityadmauth when 'Y' then 1 else 0 end as securityadm,
case sqladmauth when 'Y' then 1 else 0 end as sqladm,
case wlmadmauth when 'Y' then 1 else 0 end as wlmadm,
case explainauth when 'Y' then 1 else 0 end as explain,
case dataaccessauth when 'Y' then 1 else 0 end as dataaccess,
case accessctrlauth when 'Y' then 1 else 0 end as accessctrl,
case createsecureauth when 'Y' then 1 else 0 end as createsecure
from sysibmadm.authorizationids a
left join syscat.dbauth d
on d.grantee = a.authid
where authidtype = 'U'
order by username;
Comments
Post a Comment