How can I manually enter my credentials in SQL Server management Studio 2008 when using Windows Authentication?

StackOverflow https://stackoverflow.com/questions/476188

  •  20-08-2019
  •  | 
  •  

Question

Usually, when using Windows Authentication, the software (eg Internet Explorer) tries to use Windows Authentication, and if it doesn't succeed (because the domain is untrusted, or because the credentials are not ok for example), it just popups a login window so that you can input your domain, login and password.

With sql Server Management Studio 2008, if I select "Windows Authentication", the login/password boxes are autopopulated with my current credentials, and if I try to login, it says :


Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452)


I never get a chance to enter my credentials on the server domain...

I know I can fix this by either joining the domain on my computer, or enabling "sql server authentication", but that's not what I want :)

Any ideas on how to solve this?

Was it helpful?

Solution

try this: Use RUNAS to set your Windows Auth domain for database connections

runas /user:domain\user “C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\ssmsee.exe” 

runas /user:domain\user “C:\WINDOWS\system32\mmc.exe /s \”C:\Program Files\Microsoft SQL Server\80\Tools\BINN\SQL Server Enterprise Manager.MSC\”" 

runas /user:domain\user isqlw 

OTHER TIPS

Trusted Authentication will use the credentials that you are logged into the machine with to try and connect, there’s not a way round this, if you want to use trusted authentication for management studio, you need to be logged on to your machine with an account that is allowed access to SQL, if not then you will have to use SQL authentication.

Edit: As posted by Gulzar, RunAs would be a definate solution to this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top