Warning: Making these changes can cause serious, system-wide problems within your environment. Do not make these changes unless you are confident with these steps and understand the impact to your system and other applications running on it.
System.Data.SqlClient.SqlError: Login failed for user ‘sa’ because the account is currently locked out. The system administrator can unlock it. The error occurs when the SQL Server administrator account is locked. To unlock the SQL Server ‘sa’ account, run the following command:
ALTER LOGIN sa WITH PASSWORD = 'new_password' UNLOCK*Enter the existing ‘sa’ password if remembered, otherwise enter a new one.
Option 1 –From MicroSoft SQL Server Management StudioYou will need authority to access the SQL Server directly. Choose Widows Authentication mode and login with an administrator account. Open a new query window, enter the ALTER command and click execute to unlock the ‘sa’ account.
Option 2 –From the command promptUsing the Windows “Trusted” ConnectionSQL Server 2000OSQL -S SERVER\SQL Instance -E SQL Server 2005\2008SQLCMD -S SERVER\SQL Instance -E
(Using a SQL administrator account)SQLCMD -S SERVER\SQL Instance -U account name -P Password
Once connected to the SQL Server you will see the 1> prompt. You can type the ALTER DATABASE command and hit Enter. You will see the 2> prompt, type GO and hit Enter to execute the command. Type Exit to log out and close the command prompt.
After unlocking the ‘sa’ account, you will need to open the Bentley SELECTserver Database Setup and enter the new password, if it was changed.