Search code examples
informix

How to list all the roles existing in informix database?


I know in sysusers table, we can see roles associated with each user in defrole column.

Now I have been searching in below tables:

B_APP_ROLES

ROLES

But I can't find roles defined in defrole column in above tables.

Also can we see which tables have granted what roles?


Solution

  • dbschema -r all -d database_name should list all the roles created and grants to those roles for that particular database.

    This information I believe would be coming from the sysroleauth table.

    Then if you want to see what table level permissions a particular role has, the role name would be the grantee column in systabauth.

    So the query would be like

    select * from systabauth where grantee = "rolename";