LOCKED STATUS OF ALL USERS WITH DATES
=======================================
SQL> SELECT username, account_status, created, lock_date, expiry_date from dba_users where default_tablespace not in ('SYSTEM','SYSAUX','SYS','SYSMAN') and account_status != 'OPEN';
LOCKED STATUS OF PARTICULAR USER WITH DATES
==============================================
SQL> SELECT username, account_status, created, lock_date, expiry_date from dba_users where account_status != 'OPEN' and username like 'RN%';
UN-LOCKED STATUS OF PARTICULAR BUSINESS USER
=============================================
SQL> SELECT username, default_tablespace from dba_users where default_tablespace not in ('SYSTEM','SYSAUX','SYS','SYSMAN') and (account_status not like 'LOCK%' or account_status not like 'EXPIRE%');
Happy Learning .....
No comments:
Post a Comment