监控15天内被锁或过期的用户:
select * from dba_users
where
lock_date > trunc(sysdate - 15)
or (account_status in ('EXPIRED(GRACE)') and (expiry_date between sysdate -15 and sysdate + 15))
or ((expiry_date between sysdate -15 and sysdate + 15) and account_status not in ('LOCKED'));