Connect to SQL Server with Windows Authentication in a different domain I am trying to connect to a remote SQL Server on a VPN in a different domain. When I enter the Server name on the SQL Server and choose Additional Connection Parameters to add some extra stuff needed by my school:

Integrated Security=SSPI; User ID=DOMAIN\username; Password=Password


I get the following error:


  Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
There is another way, which I now use in preference to the runas /netonly method.
You can add the credentials to your profile in Windows using the Credential Manager found in the Windows control panel.

Open Credential Manager

Click &quot;Add A Windows Credential&quot;

Populate the &quot;internet or network address&quot; field with the name and port number of the SQL instance you wish to store credentials for.
Example: UniServer:1433 (1433 is the default port, you may need a different port, especially if you are connecting to a named instance)

Populate the &quot;User Name&quot; (don't forget to include the domain e.g. MYDOMAIN\MYUSER)

Populate the &quot;Password&quot;

Click OK


If you have the server name, port and login details correct, you should now be able to use Windows Authentication from most client tools, SSMS, Excel, whatever. They will all use the stored credentials.
Tip: Sometimes you need to use the FQN for the server when adding the credentials. e.g. UniServer.UniDomain.org:1433, it all depends on your network specifics.
Here is a quick demo of the method : http://youtu.be/WiVBPsqB9b4
It is a screen grab of me attempting (and failing) to connect to a SQL Server running in a VM from my desktop, then adding the required credentials and trying again - successfully.
Tip: use the &quot;cmdkey /add&quot; command to script creating and updating stored credentials.