Thursday, November 10, 2022

Why and How to get a list of none Oracle maintained users ?

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

Why and How to install Grid 19c on RHEL 8?

  Why ? Simply we will be requested to install Oracle Grid RAC DB on Redhat RHEL 8, below is my note for this installation . How ? 1-  OS in...