I'm trying to determine what table permissions a user has. The usual way to determine this is to do:
SELECT * FROM DBA_TAB_PRIVS WHERE GRANTEE = '<username>';
However, the username I am looking for is not in the table DBA_TAB_PRIVS. But it does show up in DBA_USERS, and I know the user HAS privileges because they are able to log in and do SELECT queries.
In fact there are many such discrepancies:
SELECT USERNAME, GRANTEE FROM DBA_USERS u
LEFT JOIN DBA_TAB_PRIVS p
ON u.USERNAME = p.GRANTEE
ORDER BY USERNAME
gives:
USERNAME GRANTEE
-------- -------
BOB17 (null)
DBA DBA
DBA DBA
DBA DBA
DBA DBA
JANET5 (null)
STEVE34 (null)
SYSTEM SYSTEM
SYSTEM SYSTEM
SYSTEM SYSTEM
So how can I determine the privileges for users who are not in the DBA_TAB_PRIVS table?