Skip navigation

I've forgotten the sa password for SQL Server - what can I do?

A. The easiest way around this is to logon to the actual SQL Server NT machine itself as administrator. Then connect to SQL Server using any of the tools and specify "." as the server name and ask for a trusted connection. As long as the admins group hasn't been explicitly removed from having sa rights then you should connect ok and be able to reset the password.

If you're in mixed-mode and you know the NT userid of someone with sa rights, then get their password reset and logon/connect as them.

Otherwise you can try and find a dba's machine who already has the server registered to SQL EM with sa and use that copy of SQL EM to connect.

If all these fail then you'll have to rebuild master and disk reinit (6.x) or re-attach (7.x) all the user databases.


TAGS: Security SQL
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish