Why ?
In oracle
database there are users created and managed by oracle and there are another
users created by administrator, starting from 12c there is a new field in
dba_users that categorized these user maintained by oracle or not , below I
will show a query for both version.
How ?
Below
are select statement that will list the administrator create user and not
maintained by oracle users only :
1- Oracle 12c and above you can directory used
this query:
select* from dba_users
where oracle_maintained = 'N'
ORDER BY 10 ASC NULLS LAST;
2- 11g and below you may use the below query
where assumption for database create date and below is oracle maintained because
these users are created during the installation and rest of users will be administrator
created..
SELECT *
FROM dba_users
WHERE TRUNC(created) > (SELECT
MIN(TRUNC(created))
FROM dba_users)
ORDER BY 10 ASC NULLS LAST;
No comments:
Post a Comment