SQL Server - Setting SA password in SQLExpress

I locked myself out of a development database once by setting my "default" database to a newly created database and then later deleting it - the system wouldn't let me login.   Since then I've made it a point to have at least two Admin accounts into my SQL Server database.

It's been a while since I installed a new Server Instance so I had to relearn the steps taken (which are far easier with SQL Server 2005) - they follow:

  1. Launch SQL Server Management Studio
  2. Click on Security | Logins
  3. Right click on SA select Properties
  4. Select "Status" page
  5. Select Login of "Enabled" (radio button)
  6. Select "General" page
  7. type in new password

if you attempt to login as "SA" with your new password you will be greated with the following message:

Login failed for user 'sa'.  The user is not associated with a trusted SQL Server connection (Microsoft SQL Server, Error: 18452)

To resolve this comply with the following steps:

  1. Right click on the "Server" (not the database)
  2. Select Properties
  3. Select Security page
  4. Change Server Authentication to "SQL Server and Windows Authentication mode"
  5. Right click on the "Server"
  6. Select "Restart"

You'll now be able to login to your server as SA


Tags:
Categories:


Actions: E-mail | Permalink |  Grammar/Typo/Better way? Please let me know