0

When I connect to a server enter image description here

via SSMS, I can connect fine albeit a slow.

When I click on a new query or try to run a view in a database on this server, the same prompt comes up but with everything greyed out and then after a while the prompt disappears and the view runs or new query tab opens:

enter image description here

It's like SSMS is trying to connect to the server again every time I run something or even when clicking new query. How do I stop this prompt appearing?

  • Hello Randi, v.17.6. SQL server 2016. – Stl Aug 7 at 19:05
  • the IT team do all the setting up but unfortunately they don't have an actual DBA and I'm an end user. The server is a cloud server - Azure - however, we do have a networked one, which connects pretty much instantaneously and no prompt! We're replacing the networked one with Azure. – Stl Aug 7 at 19:21
  • Then it's the network latency as pointed out in Sean Gallardy's answer below – alroc Aug 8 at 2:10
3

It's like SSMS is trying to connect to the server again every time I run something or even when clicking new query.

That's because it is. That's how it works, each connection is a new connection. The initial connection dialog you see if for object explorer. Each open "new query" tab is its own connection.

How do I stop this prompt appearing?

It's appearing because there is either very high network latency or the pre-login/login times are long. Almost always it's due to very bad latency/undersized vms. Check your network round trip time to the server and check that the server is under heavy load or undersized.

Adding in Aaron's comments which are also on point:

Could also be a not-very-efficient logon trigger or an expensive resource governor classifier function on that server (connecting via a local SSMS on the VM might rule this out). The error log might yield some clues too, or an extended events session that captures connection/log in information.

  • 1
    Could also be a not-very-efficient logon trigger or an expensive resource governor classifier function on that server (connecting via a local SSMS on the VM might rule this out). The error log might yield some clues too, or an extended events session that captures connection/log in information. – Aaron Bertrand Aug 7 at 21:59
  • Thanks everyone for answers. I'll pass this on to the IT team to see if they can look into/address the latency – Stl Aug 8 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.