Recently encountered problems are quite interesting. First, I haven't started the test database for a long time. Today I opened the database and encountered the following error during the test using the service program:
- Message: System.Data.SqlClient.SqlException: Login failed for user 'dcp_prod'.
- Reason: The password of the account has expired.
Obviously, this is because the password is invalid. The account dcp_prod uses the password invalidation policy to open the database and view the attributes of this account, the Enforce password policy and Enforce password expiration attributes are selected.
Now you only need to reset the password. However, an error is prompted as follows:
- System. Data. SqlClient. SqlException:
- Login failed for user 'dcp _ prod' because the account is
- Currently locked out.
- The system administrator can unlock it.
- The account is currently locked. The system administrator can unlock it .)
What is the reason? The locked out is locked, and then the administrator stops to unlock it. It literally means to follow the prompt area to open the account attributes again.
(Here is the status after the response is normal, the default is unavailable in gray)
Click the Status label. The Login is locked out attribute is selected. deselect the attribute and click OK to return to the program. It's strange that the above locked out prompt is used to open the attribute to check. This attribute is selected again. This was the case several times in a row and began to wonder. Later, I checked it online and said that other users tried to connect to the database. I suddenly realized that the service program was competing with me for a database. The service program connects to the database every three seconds for corresponding operations. If you try to change the password, the account will be locked. In my Administrator tool-> service, I shut down the program, changed the password, and re-opened the program. This error disappears.