Problem
While working on SQL Server database sometimes users may get the following error message.
Password validation failed. The password does not meet the windows policy requirements because it not complex enough (MS SQL Server Error 15118)
The password’s character-length is more than required but it does not contain any special characters.
Solution
Users can easily resolve the issue of resetting the SQL Server password through common fixes. There are two possible ways to overcome the SQL Server Error 15118, i.e.
- By using SQL Server Management studio and T-SQL
- By using CMD
Both the mentioned ways, involve some steps to reset the password and resolve the occurrence of password validation failed error 15118.
By Using SQL Server Management Studio and T-SQL
- Enabling the SA Account
- Using SQL Server Management Studio
- Once the SQL Server Mixed Authentication mode is enabled, navigate to the security option.
- Then, go to Login Option >> Object Explorer >> Enable SA Account.
- Now, right-click on SA Account >>Login Properties >> set password for SA Account >> Confirm.
- Choose an option Status >> Set SA Account >> Enable >>click Ok.
- Close the login properties.
- Using T-SQL
- Login to SQL Server by using open Management Studio and Windows Authentication mode.
- Now to create a query click on New Query and type a query:
- By executing the commands in query, SA account will be enabled and easily set SQL Server logon
- Password Confirmation
User can reset the password by changing the SQL Server Authentication Mode from Windows to SQL Server and Windows Authentication mode, which is known as Mixed Mode Authentication. Select SA account as SQL Server logon account and enable SA account with two ways as discussed:
NOTE: Once the process has completed, restart the SQL Server Services and under SQL Server Authentication mode, user will be able to login to SQL Server with SA account.
Once the SQL Authentication is changed, user needs to restart the Server to check for the changes, which has taken place. After that go to General >> Password >> Confirm-Password >> click OK.
By Using CMD
There is another way to disable the password complexity requirement, i.e. by simply following the steps given:
- Run command prompt as Administrator >> type:
- Run Notepad, and open local.cfg to edit >> change the “PasswordComplexity=1”, change 1 to 0
- User can also set the maximum length requirements higher or lower with “MinimumPasswordLength” key >> close notepad before saving.
- Now at command prompt, type
- Re-launch “Local Security Policy” window and refresh its value.
- After this, user can set less secure as well as less complex password.
Limitation: By using the CMD, user sometimes faces an error, i.e.
Solution: The limitation can be overcome by adding any user to systemadmin role and after that user can make the use of same name to modify the system admin’s tool to fix the issue.
Conclusion
In the above blog, we have discussed two-ways to resolve the occurrence of SQL Server error 15118 password validation failed. In first solution, there are sub-parts, which help to resolve the error occurrence. Whereas, in second solution, there is a bit of complications as well as users may sometimes face an error after implementing the process. However, the possible workaround to solve the issue has also been discussed for users who may face SQL Server Error 15118.There may be some other password failure situations like SQL Server Error 18456 that generally occurs while user connecting to the database.