Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

password expiry notification

Roshan BisnathApr 23 2024 — edited Apr 23 2024

Oracle 19c

Hello Team,

kindly advise how to get notified before 365. We have to get notified 30 days before 17-FEB-25. the password expiry for one account is 17-FEB-25

select sum(SEVERITY * SIGN(COUNT)) as RESULT_CODE from (
  select 1 as SEVERITY, count(*) as COUNT
  from dba_users
  where account_status = 'OPEN' and (expiry_date > sysdate+7) and (expiry_date <= sysdate+14)
  union
  select  2 as SEVERITY, count(*) as COUNT
  from dba_users
  where (account_status = 'OPEN' and (expiry_date <= sysdate+7)) or (account_status = 'EXPIRED(GRACE)') or (account_status = 'EXPIRED')
)

of note, the grace time is 7 days.

Regards,

Roshan

Comments
Post Details
Added on Apr 23 2024
1 comment
518 views