[20141124]sql server密码过期,通过SSMS修改策略报错

时间:2024-09-13 16:34:14

背景:

新建了用户,没有取消掉强制密码策略

修改掉策略报错

错误:

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

使用代码修改:

USE Master
    GO
    ALTER LOGIN [somelogin] WITH PASSWORD = ‘samepassword’
    GO
    ALTER LOGIN [somelogin] WITH
    CHECK_POLICY = OFF,
    CHECK_EXPIRATION = OFF;