Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a list of locked users in an Oracle database?

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?

like image 664
ninesided Avatar asked Oct 10 '09 11:10

ninesided


People also ask

How do you check if a user is locked in Oracle?

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%';

Who is locking user in Oracle?

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.

How check privileges to all users in Oracle?

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 .


1 Answers

Found it!

SELECT username,         account_status   FROM dba_users; 
like image 139
ninesided Avatar answered Oct 03 '22 23:10

ninesided