minimum password length sets the minimum password length. You can set a minimum password length from 0 – 30. The value you specify with must be at least the sum of all other minimum requirements.
For example, minimum password length must be set to at least 10 if you have set:
minimum digits in password to 3
minimum special characters in password to 2
minimum uppercase characters in password to 2
minimum lowercase characters in password to 3
In this example, if the password length is less than 10, a warning message displays, but the setting of the password policy option succeeds.
To set the minimum password length, enter:
sp_passwordpolicy 'set', 'minimum password length', number
For example, if you set minimum password length to
6, you can create a new password for login johnd
with
six characters by entering:
sp_password 'old_complex_password', 'ABcd12$%', 'johnd'
However, if you attempt to change your password as follows:
sp_password 'old_complex_password', 'joh12', 'johnd'
and the minimum password length is 6, the command fails.