The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON
Date Published: 22 October 2010
In addition to the dreaded SQL Server Error: User Group or Role Already Exists in the Current Database error, you may also get this error when creating new logins after a database move:
Alter failed for login ‘somelogin’.
An exception occurred while executing a Transact-SQL statement or batch.
The CHECKPOLICY and CHECKEXPIRATION options cannot be turned OFF when MUST_CHANGE is ON. (Microsoft SQL Server, Error: 15128)
The fix for this is to change the password. You can do this via script like so:
ALTER LOGIN [somelogin] WITH PASSWORD = ‘samepassword’
ALTER LOGIN [somelogin] WITH
CHECKPOLICY = OFF,
CHECKEXPIRATION = OFF;
That’s all there is to it. I found this post useful while researching this issue.
Steve is an experienced software architect and trainer, focusing on code quality and Domain-Driven Design with .NET.