Depending on what mode SQL Server was
installed (Windows Authentication or Mixed Mode), you may have to do a
few things. If you installed in mixed mode, you can log in as sa and add
the administrator user as a Login under the Security section. Make sure
you assign sysadmin role to the user, which can be found under Server
Roles.
If Windows Authentication mode was chosen during install then there are a couple of things you can do, but I think the easiest is just to recreate the user "sa_new", login into SQL Server as that user, and follow the previous step to add the administrator user as a login.
UPDATE: If all else fails, you can run SQL Server in Single User Mode, which allows a single connection to the server, and enable/change the sa password. To do this you can:
For step 6 you may have to do ALTER LOGIN sa WITH PASSWORD = '' UNLOCK;, because the sa account may be locked from too many login attempts.
Tested on Windows 7 Ultimate with SQL Server 2008 Standard. Hope this helps.
If Windows Authentication mode was chosen during install then there are a couple of things you can do, but I think the easiest is just to recreate the user "sa_new", login into SQL Server as that user, and follow the previous step to add the administrator user as a login.
UPDATE: If all else fails, you can run SQL Server in Single User Mode, which allows a single connection to the server, and enable/change the sa password. To do this you can:
- Open the command prompt (Right-Click on and select "Run As Administrator")
- From the command prompt type net stop MSSQLSERVER
- Next type net start MSSQLSERVER /m
- Open SQL Server Management Studio. Do not login, cancel the login dialog.
- From the file Menu select New->Database engine query, and login (Make sure you use the host name and not localhost).
- Execute the query ALTER LOGIN sa WITH PASSWORD = ''; to reset the password (if the sa is not enabled then type ALTER LOGIN sa ENABLE to do so)
- Login with the sa user and add the Administrator user.
For step 6 you may have to do ALTER LOGIN sa WITH PASSWORD = '' UNLOCK;, because the sa account may be locked from too many login attempts.
Tested on Windows 7 Ultimate with SQL Server 2008 Standard. Hope this helps.
No comments:
Post a Comment