Metric Extension - Password Expiration Date
I would like to use Enterprise Manger in order to check exipration days of oracle user on my infrastructure database.
I created a metric extension with this query:
select username, account_status, trunc(expiry_date-sysdate) days_to_expire
from dba_users
where expiry_date is not NULL
and account_status in ('OPEN','EXPIRED')
and username not in ('SYS','SYSTEM','SCOTT','JOSH');
The query works but I've some negative results for some users and I don't want false positive alerts.
I'll checked the users with negative results and I've found that they are open but with expiration_date populated with an old date.