views:

196

answers:

1

I cannot connect to the SQL Server instance if I do not start management studio as a administrator. I am running windows 7, SQL Server 2008, and Management Studio 10.0. If I run as a normal user, the error I get is:

Cannot connect to ..

Additional information: login failed for user 'COMPUTERNAME\MyUserName'. (Microsoft SQL Server, Error 18456)

for server name I have tried the following:

.
localhost
COMPUTERNAME

Edit: SOLUTION HERE http://serverfault.com/questions/130434/how-do-i-login-to-sql-server-without-having-to-use-run-as-administrator-when-st

+1  A: 

Check how your SQL server authentication is configured. Most probably you have a login defined only for BUILTIN\Administrators, but don't have one for BUILTIN\Users or for you Windows account.

Update: As per comment reques - expanding my answer with some detail I provided as a comment.

Add a new login for BUILTIN\Users or your Windows account (LOCAL_MACHINE\MedicineMan :-)) and map the proper access rights. If you want to do DB admin rights, you should add login for your account. If you want just regular DB read/write, you can go for BUILTIN\Users.

Franci Penov
I logged in as admin, found server properties and permissions. Indeed only BUILTIN\Administrators is on the list. Now what do I do?
MedicineMan
Add a new login for BUILTIN\Users or your Windows account (LOCAL_MACHINE\MedicineMan :-)) and map the proper access rights. If you want to do DB admin rights, you should add login for your account. If you want just regular DB read/write, you can go for BUILTIN\Users.
Franci Penov
@Franci - Add the comment to the answer body@ MedicineMan - Accept as answer :)
Slavo
@Slavo, @Franci I found that the directions were not very clear. For this reason, I do not want to mark your question as accepted and award these points. Franci did direct me to serverfault where I ultimately got a well written answer to my question. I apologize if I could not understand your solution. I'm sure that it is excellent.
MedicineMan
@MedicineMan - your choice, but the answer you got on serverfault is exactly the same I gave you here.
Franci Penov