Saturday, July 2, 2011

Lost sql-server password

Here's a neat thing to remember if you're using MSSQL:

To change the "sa" password, login to your computer using an administrator account. Open your SQL Server and log in using Windows Authentication. Open a new query window and type in the following command:

sp_password @new = 'new_password', @loginame = 'sa'
After that go to section Security –> Logins –> double click "sa" or choose properties. Go to "Status" and check to see if "Login:" is enabled. If not, enable it.

No comments: