Site icon An Oracle Spin by Alex Lima

Check Oracle Password for Expiration

This simple script will check if a user password is expiring in the next 120 days.

set pagesize 500
set linesize 200
set trimspool on
column “EXPIRE DATE” format a20
select username as “USER NAME”, expiry_date as “EXPIRE DATE”, account_status
from dba_users
where expiry_date < sysdate+120
and account_status IN ( ‘OPEN’, ‘EXPIRED(GRACE)’ )
order by account_status, expiry_date, username
/

Exit mobile version