当 MUST_CHANGE 为 ON 时,不能关闭 CHECK_POLICY 和 CHECK_EXPIRATION 选项。 (微软 SQL 服务器,错误:15128)
An exception occurred while executing a Transact-SQL statement or batch.
The CHECK_POLICY and CHECK_EXPIRATION 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 CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF;
参考地址:
1. https://ardalis.com/the-check_policy-and-check_expiration-options-cannot-be-turned-off-when-must_change-is-on/
2. http://www.sqldbadiaries.com/2010/11/07/the-check_policy-and-check_expiration-options-cannot-be-turned-off-when-must_change-is-on/