Set Expiration Date

Category: sql server security


Shawn Matlock on Tue, 16 Feb 2016 16:27:55

Hello All,

I have a need to create new users with password set to expire in 2 or 3 days. Does anyone know if this is possible?

Thank you,



Alberto Morillo on Tue, 16 Feb 2016 20:13:27


Set the expiration date of a Windows login at the operating system level using VBScript as shown on the URL below:

You can use a logon trigger that checks the logins against a table with the expiration dates for each login.

Alternatively you can create a job to disable the logins on a specific date.

Hope this helps.


Alberto Morillo