How do I login to SQL Server without having to use "Run as Administrator" when starting Management Studio, in Windows 7?

16,830

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:
16,830

Related videos on Youtube

MedicineMan
Author by

MedicineMan

Updated on September 17, 2022

Comments

  • MedicineMan
    MedicineMan over 1 year

    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.

  • MedicineMan
    MedicineMan about 14 years
    I'll try this tonight. I hope it works.
  • Jota.Toledo
    Jota.Toledo over 3 years
    Note that for me using my domain username for a login name using windows authentiction worked.