The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON

Date Published: 22 October 2010

The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON

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:

USE Master
GO
ALTER LOGIN [somelogin] WITH PASSWORD = ‘samepassword’
GO
ALTER LOGIN [somelogin] WITH
CHECKPOLICY = OFF,
CHECK
EXPIRATION = OFF;

That’s all there is to it. I found this post useful while researching this issue.

Steve Smith

About Ardalis

Software Engineer

Steve is an experienced software architect and trainer, focusing currently on ASP.NET Core and Domain-Driven Design.

Ardalis

Copyright © 2020