Search code examples
oracle-databaseselectoracle11goracle10gdata-dictionary

oracle 10g ~ getting local user list


In Oracle 11g, they have a column called Authentication_Type in the dba_users table, using which we can get the list of local users created using password with the simple following query:

select USERNAME from DBA_USERS where AUTHENTICATION_TYPE = 'PASSWORD'

My question is, how can I get the list of local users created by password in Oracle 10g? In Oracle 10g the dba_users table doesn't have the Authentication_Type column.


Solution

  • You can use the password column. Local users will show an encrypted password. External ones will show null:

    SELECT username
    FROM   dba_users
    WHERE  password IS NOT NULL