Is it possible to determine what user created another user's account in Oracle database?
I have two types of users in database:
- Users having system and object privileges
- Users having only system privileges
I can find the owner of all users having system and object privileges.
select distinct d.username,d.account_status,t.privilege,t.owner
from dba_users d,dba_tab_privs t where d.username=t.grantee
and d.account_status='OPEN';
But this query doesn't fetch the users having only system Privileges. Please help how to find the owner of all those users having only system privileges?
Best Answer
DBA_USERS (Table) will give you access to WHEN your user was created, but AFAIK the only way to get WHO created your user is if auditing is turned on.
This also requires you to have access to the DBA_AUDIT_TRAIL table.
Further Reading: https://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_3056.htm#i1619732