I want to be able to list all of the users in a given database along with an icon that determines whether they are locked or not. The problem I'm having is querying the "locked" status for a given user, I though it might have been on all_users
but it isn't. Can anyone point me in the right direction?
Procedure. Log in as oracle user. Verify if any database schema user account is locked by using the following command: $ select username, account_status from dba_users where username like 'PV%';
If an oracle user is locked, it is usually caused by an incorrect password entry. In some cases, even if you remove the user's lock with the help of the following script it will lock again after a while. SQL> alter user ADURUOZ account unlock; User altered.
You can try these below views. SELECT * FROM USER_SYS_PRIVS; SELECT * FROM USER_TAB_PRIVS; SELECT * FROM USER_ROLE_PRIVS; DBAs and other power users can find the privileges granted to other users with the DBA_ versions of these same views. They are covered in the documentation .
Found it!
SELECT username, account_status FROM dba_users;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With