Tuesday, December 4, 2012

The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON Microsoft SQL Server, Error: 15128

We normally faced this issue when SQL Login is set to "Enforce password policy” and “Enforce password expiration”, once set this policy and expiration can’t be changed using the below commands.

ALTER LOGIN kalyanlogin WITH CHECK_EXPIRATION = OFF,
         CHECK_POLICY = OFF;


SQLserver will return the following message
Msg 15128, Level 16, State 1, Line 1
The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON.


Resolution

Aleter Login kalyanlogin With Password="samepassword"
go
Aleter Login kalyanlogin With CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF;


 

No comments: