Wednesday, 13 January 2016

How to get a list of locked accounts / check that account is locked?

All locked accounts

SELECT username, account_status, created, lock_date, expiry_date
FROM dba_users
WHERE account_status != 'OPEN';

Specific User account status


SELECT username, account_status, created, lock_date, expiry_date
FROM dba_users
WHERE account_status != 'OPEN' and username='&username';

Use following statement to unlock an account:

ALTER USER username ACCOUNT UNLOCK;






No comments:

Post a Comment