db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Native authentication and password expiry date
Date Thu, 09 May 2013 12:47:45 GMT
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,

View raw message