Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When I start Management Studio, unless I use the "Run as Administrator" selection, I cannot login to my local SQL Server. Is this normal? I am a normal developer and don't believe I have a need for high security on my local machine.

I'm running SQL Server 2008, Windows 7.

The error I get is:

Cannot connect to (local)
Additional Information
Login failed for user 'MYCOMPUTER\MyName'. (Microsoft SQL Server, Error: 18456)

This seems to be a reoccurring theme because when I run visual studio, I have a similar login failure when I run database accessing code. Optimally, I would like a solution that solves both cases.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Most likely your problem is that your database is setup to only have logins defined for administrative users. Go into Management Studio as an admin user, and go to the Security -> Logins category. You probably only have some built in SQL users, and SERVERNAME\Administrators.

Right click the Logins category, and choose "New Login..." - from there you can add your non-admin user SERVERNAME\MedicineMan and give it the sysadmin server role. This will give it admin rights to the database while leaving it as a normal user on the Windows system.

share|improve this answer
    
I'll try this tonight. I hope it works. –  MedicineMan Apr 8 '10 at 17:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.