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

记录下

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


Problem: Recently one of my user reported the issue that, He is getting password change message while login to SQL Server. But he does not want to change the password as he has already configured at the many places. While turning off the Password Expiration message, I got the below error.

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

Solution:
To fix the issue you MUST have to change the password first without changing in password policy options. The good thing it that you can change the password to be the same as the existing one. -:)

But still you have to change the password -:) what a logic!!! You can do it from SSMS GUI as well, but I always prefer to use the scripts as it is giving me flexibility of customization.

That was the another reason I am in the support of open source software you have flexibility to add your ideas. Let’s go to fix the issue.

In the below step I am giving the same password, to fix “User Must Change Password” flag.

USE Master
GO
ALTER LOGIN [Login Name] WITH PASSWORD = 'Same Password'
GO
Now let’s turn off the passowrd policy.

ALTER LOGIN [Login Name] WITH
CHECK_POLICY = OFF,
CHECK_EXPIRATION = OFF;

转载于:https://www.cnblogs.com/byxxw/p/4913243.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值