Recently, on a contract I was sitting in the clients office, using their network.
I have a domain login to use but my laptop was part of their domain.
This causes all kinds of fun trying to connect to their databases, etc.
Here are two scripts that helped me attach Visual Studio or Sql Server Management Studio to their domain:
Start Sql Server Management Studio in a different domain:
C:\Windows\System32\runas.exe /user:their_domain\yourusername /netonly “C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ssms.exe”
Start visual studio in a different domain:
C:\Windows\System32\runas.exe /user:their_domain\yourusername /netonly “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe”
You will be prompted for the your domain password when you run these.
Happy coding,
Jim