views:

6206

answers:

3

I forgot my password for Sql Server 2005. Windows Authentication is not enabled so I cannot login. How can I remove the current instance and create a new db instance? Or is there a better solution exists?

A: 

Have you tried connecting when logged on as domain/server-local Administrator?

Stu
+1  A: 

Assuming you are a member of the Windows Admininstrator group, you can put the server in Single User mode, you could try this -

http://blogs.msdn.com/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx

Russ Cam
+1  A: 

My read of the question was that the server is set up to use SQL authentication only, and perhaps you don't know the sa password or any other SQL login credentials? If so, you might be able to change the authentication mode. For SQL Server 2005 default instances, it's stored in the registry at:

HKEYLOCALMACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer

in a DWORD called LoginMode. A value of 2 indicates Mixed Mode (both Windows and SQL authentication are supported); I think 0 is Windows only and 1 is SQL only. You can try changing it to 2, restart the MSSQL service, then try to get into the SQL management studio after logging into the machine as an administrator.

If that fails, you can create another instance by re-running the setup program.

Chris Tybur