Re: permissions table name
Posted in 2000
Topics: Security, Permissions & Auditing
On Fri, 4 Feb 2000, Austin Castro wrote:
> Hi guys,
> Is there a table which stores all the roles created in a database, I think
> there is - at least is seems logical. If there is, what is the name of that
> table. Thanks.
>
>
> Austin
>
>
Sysroleauth and systabauth in the system catalog tables will show who has
been granted roles and what permissions each role has on each table.
a role. Here's a couple of good sqls:
database <yourdatabase>;
select rolename, grantee from sysroleauth
order by rolename, grantee;
select grantee user, systables.tabid tabid, tabname, tabauth
from systabauth, systables
where systabauth.tabid > 99 and
systabauth.tabid = systables.tabid
order by grantee
HTH
====================================================================
Harold Luse Phone: (970) 491-4120
Veterinary Teaching Hospital Fax: (970) 491-4123
Colorado State University Pager: (970) 229-8173
Fort Collins, Colorado USA E-mail: hluse@vth.colostate.edu
====================================================================
Luse Harold wrote:
> On Fri, 4 Feb 2000, Austin Castro wrote:
> > Is there a table which stores all the roles created in a database, I think
> > there is - at least is seems logical. If there is, what is the name of that
> > table. Thanks.
>
There's at least one girl out there too...
> Sysroleauth and systabauth in the system catalog tables will show who has
> been granted roles and what permissions each role has on each table.
> a role. Here's a couple of good sqls:
>
> database <yourdatabase>;
>
> select rolename, grantee from sysroleauth
> order by rolename, grantee;>
> select grantee user, systables.tabid tabid, tabname, tabauth
> from systabauth, systables
> where systabauth.tabid > 99 and
> systabauth.tabid = systables.tabid
> order by grantee
I'm pretty sure the information you are seeking is also in the SysUsers table;
the usertype would be different from 'D' (DBA), 'R' (Resource) and 'C' (Connect).
Probably 'G', but I'm definitely working from memory here.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.95 -- see http://www.perl.com/CPAN
#include <disclaimer.h>