In Windows 7, I used the following method to connect to a SQL server with a different domain/user:
runas /netonly /user:domain\username program.exe
Source: Connect different Windows User in SQL Server Management Studio (2005 or later)
However, this has stopped working since my Windows 10 update. I now get the following error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
I'm using a VPN, that seems to be working (can use Remote Desktop and view intranet pages). I have used this setup on multiple locations, on multiple systems. All used Windows 7 or 8.1, hence why I think 10 is the problem.
Has anyone had any luck fixing this?
Thanks!
Update: I have rolled back to Windows 7 and it immediately works again. Tried pinging the server, gives me a 127.x.x.x address on Windows 10, and the correct IP on Windows 7. No entries in my hosts file. What gives?