

GO Reset the SA password ALTER LOGIN sa WITH PASSWORD = 'NewStrongPassword'

Here are some common tasks: Enable the SA account ALTER LOGIN sa ENABLE Now you’re connected with sysadmin privileges without being a member of the role and can fix whatever your problem is. In the same command prompt run SQLCMD to connect the default instance or use the -S parameter to pass an instance name. Net start mssqlserver /mSQLCMD Step 2 – Connect with SQLCMD and reset the SA password or add another account to sysadmin Stop the SQL Server service and start in single user mode only allowing connections from SQLCMD: net stop mssqlserver
#Sql server sa account locked out windows#
Login to Windows as a local administrator and start an administrative command prompt. Step 1 – Start SQL Server in single user mode There are several ways to fix it but what follows is what I find to be the simplest route where the least can go wrong.

The service program will connect once every three seconds, the database, the corresponding operation, in the middle if the attempt to change the password, the account will be locked. Later in the online search, online that there are other users trying to connect to the database, it dawned on me, that service is a database program to compete with me. Such continuous back and forth several times like this, began to wonder. Strange, or locked out the above tips, open the properties view, this property has again been selected.

(This is the return to normal state after the default is greyed)Ĭlick on the Status tab, and indeed Login is locked out property is checked, unchecked, click OK, back to the program. This is what causes it, locked out is locked and unlocked using the administrator to stand, literally so, according to the prompt area to do, open the account properties again. : Login failed for user 'dcp_prod' because the account isĬurrently locked out. But then there was a mistake, suggest the following: Now only need to reset the password on it. Obviously, this is because the password fails, dcp_prod the account using the password expiration policy, open the database to view the account properties, and sure enough, Enforce password policy and Enforce password expiration both properties are selected. Reason: The password of the account has expired. Message: : Login failed for user 'dcp_prod'. The first is a long time not to open a test database, open today, appear when using the service program to test the following error message: Today, more interesting problems encountered.
