On 5/9/13 3:02 AM, Thomas wrote:
Hi,
is there a way to find out when the password of the user logged in will
expire so an application can display a message like "Your password will
expire in x days. Do you want to change it now?"
Thanks
Hi Thomas,
The following query shows how many days remain in the lifetimes of
NATIVE passwords:
select username, { fn timestampdiff( sql_tsi_day, current_timestamp,
lastmodified ) }
from sys.sysusers
order by username;
The JDBC escape syntax for timestamp arithmetic (the bracketed bits) is
documented in the Reference Guide in the section titled "JDBC escape
syntax for fn keyword".
Hope this helps,
-Rick