Specifying the minimum password length

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:

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.