Reputation: 1271
I have several windows applications that can be access through an SQL account. I need to validate the user password against Local Security Policy of the Server without modfiying the password itself.
What I require is an SQL statement that return a boolean value whether or not the password is according to the server policy or not.
Is it something possible?
Upvotes: 1
Views: 1253
Reputation: 16260
Based on the extra information in your comment, it seems that you want to validate existing SQL login passwords against the Windows password policy, but without making any changes to the logins.
This is probably not possible because there is no way to retrieve a SQL login password, so there is no way to validate them yourself programmatically. However, according to the documentation, the check is on by default, so it's possible that all your passwords are already compliant with the OS security policy, unless you've deliberately set this off and then on for some logins.
If you need to ensure that all login passwords comply with the policy, the best way to make sure is to set the check on for all logins (if it isn't already) and force a password change. Even better, stop using SQL logins and use Windows logins instead, although I know that isn't possible in every situation.
Upvotes: 1