Check User with Default password in Oracle database

Check user having Default password in Oracle Database

Fetch the list of user present with Default Password in Oracle
1. Login with the SQLPLUS with SYSDBA user.

SQLPLUS / as sysdba

2. Check the User with Default password with following query:

Set line 200 pages 200
set col username for a22
SELECT d.username, u.account_status FROM DBA_USERS_WITH_DEFPWD d, DBA_USERS u
WHERE d.username = u.username ORDER BY 2,1;

3. You can also check user which is in open state and having default password.

Set line 200 pages 200
set col username for a22
SELECT d.username, u.account_status FROM DBA_USERS_WITH_DEFPWD d, DBA_USERS u
WHERE d.username = u.username and u.account_status='OPEN' ORDER BY 2,1;

4. You can check user which is locked state with default password.

Set line 200 pages 200
set col username for a22
SELECT d.username, u.account_status FROM DBA_USERS_WITH_DEFPWD d, DBA_USERS u
WHERE d.username = u.username and u.account_status='LOCKED' ORDER BY 2,1;

5. Change the Default password with following command:

-- for change the username password
ALTER USER username IDENTIFIED BY password;
-- If you want to unlock them also use following command:
ALTER USER username ACCOUNT UNLOCK IDENTIFIED BY password;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.