How do I login to SQL Server without having to use "Run as Administrator" when starting Management Studio, in Windows 7?
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.
Related videos on Youtube
MedicineMan
Updated on September 17, 2022Comments
-
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 about 14 yearsI'll try this tonight. I hope it works.
-
Jota.Toledo over 3 yearsNote that for me using my domain username for a login name using windows authentiction worked.