Extremely slow initial connection using ssms

  • For the last week or so anytime I load ssms to connect to my sql server, the initial connect takes a very long time. Like 10-20 minutes, but once it is connected once I can connect to any other instance immediately. I can even disconnect and reconnect immediately, but if I close ssms complete, and try again, I once again wait for 10+ minutes. I can use the command line tool and connect instantly every time.

    I feel I have ruled out dns, and ad authentication since I have the same issue using ip or name and using sql authentication or windows authentication.

    I can connect instantly to the same instance from any other computer. It is only affecting my computer.

    SQL 2008 R2

    Windows 10 Pro

    SSMS 2014

    I also noticed that using c# to connect to sql has the same issue from my machine. So it appears to be more than just SSMS, perhaps it has something to do with the SQL native client?

    Thoughts?

    Thanks,

    -Bo

  • Is the same issue repeatable for both virtual and physical servers?

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • The only 2 instances we have are on the same virtual server. Keep in mind that other developers are able to connect instantly on their machines, and I can connect instantly on other machines. It seems to be only affecting my computer, and seems to be app specific.

    I say app specific because SSMS and a custom C# app both experience the same initial connection issue, and can reconnect instantly. Once one is connected, the other still has the delay. They can switch instances instantly. It really seems to be something to do with the .net framework or the sql native client. It is as though it is trying to resolve something and finally gives up.

    Thanks,

    -Bo

  • I vaguely remember there being some issues like this where certificates for some assemblies are trying to be verified, and it's trying to reach out over the internet to verify; if it can't it waits for a timeout. That seems like something that could affect both SSMS and C# without affecting sqlcmd.

    I read an issue like that a very long time ago, so my memory might not be so correct; it seemed close enough to your issue that I thought I'd mention it, on the off-chance it helps. If I can find the forum or article where it was mentioned I'll update the post with it.

    Cheers!

  • I believe I found a similar article that said to add crl.microsoft.com to 127.0.0.1 in my etc\hosts file.

    That made no difference for me unfortunately.

    Thanks,

    -Bo

  • Yes, back a few weeks ago, there was a similar post concerning slow initial connections for SSMS.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

  • Several threads on the Internet suggest disabling Check for publisher's certificate revocation in the Internet Options, Advanced control panel.

  • Just tried disabling the certificate revocation check, and no change.

    Rapidly losing hope lol.

  • I know this post is quite old, but I am currently experiencing the same issue on SQL Server 2014. Did you ever figure out a solution to this problem? We have a client who uses Dynamics GP and it takes 15 minutes to connect to the SQL Server. GP itself uses ODBC so it appears to be quick, as does SQLCMD. SSMS has the same delay though. It does seem like a SQL Native issue, but I have not found anything that proves it. I am planning on reinstalling it to see if it helps. They are connecting to another machine remotely, so it is not on the same box. If I go onto the SQL Server machine and connect, it is of course instant.

    Thank you for any help you can provide.

    Regards,

    Joe

  • I found another post on this site that suggested it was an issue with the vmware client. I think there is an updated client that does not cause the issue, or you can uninstall that and give it a try. It fixed it for me.

    Another option is running ssms or in your case GP as an admin.

    To be clear, by vmware client, I mean on the box you are connecting too. Does it have vsphere installed, if so try uninstalling or updating that.

    Hope that helps.

    Thanks,

    -Bo

  • Bo, you are a genius! I opened SSMS as admin and it connected instantly. I then opened it normally and the delay was there. So it does sound like a VMWare issue. I will talk with their IT person on Monday and see if we can have VMWare updated or reinstalled on the machine. I would still have been banging my head against the wall, so thank you so much for pointing me in the right direction. I appreciate it.

    Regards,

    Joe

  • Happy to help, wish I could take credit lol.

    Thanks,

    -Bo

  • I was having the same problem.  This may occur on a machine that has OR had VMWare Horizon View Client.

    In
    HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Kernel\ObUnsecureGlobalNames
    add

    netfxcustomperfcounters.1.0

    to whatever else is in the data window.
    Reboot
    and everything works fine.

    good luck

  • Adding to the registry entry ObUnsecureGlobalNames and reboot made my connections start working fast. So this solution worked for me. Thanks for the help.

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply