Today I was investigating the security of an SQL Anywhere 11 database and needed to see who had the authority to update a certain table. I managed to find the systableperm system table that holds this information. This query returns a list of users/groups and which actions they can perform on the table:
select user_name, selectauth, insertauth, deleteauth, updateauth
from sys.systableperm
inner join sys.systable on systable.table_id = systableperm.stable_id
inner join sys.sysuser on sysuser.user_id = systableperm.grantee
where table_name = 'MyTable'
No comments:
Post a Comment