0

I have a Windows 8.1 desktop box with SQL Server Management Studio 2012 client that hosts a Hyper-V VM (Windows Server 2012 and SQL Server 2012 Enterprise). I have been using this for development work with no problem for months but some time last week I started getting this error every time I try to connect using SSMS from the desktop machine.

Connection Timeout Expired.

The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21045; handshake=0; (Microsoft SQL Server, Error: -2)

I have seen this article Connection to SQL Server Works Sometimes and it does not resolve my issue.

  • SSMS from desktop that hosts VM = Fail with error above
  • SSMS from a different windows 8.1 box (on same subnet as desktop) = Success
  • SSMS from the VM on a remote desktop session = Success
  • SSMS from a different Win2012 server = Success

Again, this was a working setup that has now started failing only on the desktop that hosts the sql server VM. I have tried using a SQL Server account instead of Windows auth and it still fails. I have disabled firewalls on both machines (desktop and VM) and it still fails. Named pipes and TCP/IP are enabled. Fiddler and SQL Server Profiler gave me nothing to look at.

Any further troubleshooting pointers?

Community
  • 1
  • 1
indyDean
  • 191
  • 1
  • 1
  • 13
  • Can you access other resources like a fileshare? – Ric .Net Oct 20 '14 at 15:21
  • Yes, I can access a fileshare. – indyDean Oct 20 '14 at 15:37
  • Is there something changed like domain membership, usernames. etc... – Ric .Net Oct 20 '14 at 15:41
  • Nothing to my knowledge. As a developer box I am not under any group policy in OU's that other machines would be in. I am using the same AD username on my laptop and SSMS connection is successful. I am on a static IP on the desktop that fails but the server that succeeds is also static IP. – indyDean Oct 20 '14 at 15:54
  • Could there be some weird network policy on the hyper-v box...? this only makes sense to me if there is something on a network level wrong, but you allready checked firewalls, so that's not it. network connection is essentially working as you can access a fileshare... hmmm what else... can you use Wireshark? – Ric .Net Oct 20 '14 at 16:00
  • I have installed Wireshark on the desktop machine. Holy data dumps Batman! Anything in particular I am looking for? – indyDean Oct 20 '14 at 16:15
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/63354/discussion-between-indydean-and-ric-net). – indyDean Oct 20 '14 at 16:37

2 Answers2

1

After turning OFF the Windows Firewall in your VM and assigning an IP in your desktop's network settings. I use a batch file with the one line below to connect with SQL Server in the other domain.

runas /netonly /user:[domain]\Administrator "C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe -S 192.168.1.1"

Richard
  • 11
  • 1
0

So on the VM a coworker (with similar working setup) made some changes to the ethernet adapter's IPv6 protocols - added a specific DNS entry in the 'append these DNS suffixes (in order)' box. Still got the same error. Then I went back in and set it back to 'Append Primary and connection specific DNS suffixes' and it magically started working again. The 'Register this connection's suffixes in DNS' checkbox is also checked so maybe this forced a refresh?

At any rate it is working and I appreciate the help from Ric .Net !!

indyDean
  • 191
  • 1
  • 1
  • 13