Changing or removing password expiration interval for login or role

Use sp_modifylogin to change the password expiration interval for an existing login, add a password expiration interval to a login that did not have one, or remove a password expiration interval. sp_modifylogin only effects login passwords, not role passwords.

This example changes the password expiration interval for the login “joe” to 5 days:

sp_modifylogin "joe", @option="passwd expiration", @value="5"

The password expires 5 days from the time of day you ran password expiration.

NoteThe value parameter is a character datatype; therefore, quotes are required for numeric values.

See sp_modifylogin in the Reference Manual: Procedures.