sql server latency

ACDBA 421 Reputation points
2022-06-10T16:06:08.89+00:00

Hi All,

Do we have PowerShell script or something which can capture time to establish connection towards sql server?

We have an aws application which is taking more time connecting to sql server after migrating sql vm to azure. connection towards onprem is 5 times faster than its towards azure.

CPU\Network\Disks are fine in sql server.

Regards,
ACDBA

SQL Server on Azure Virtual Machines
0 comments No comments
{count} votes

Answer accepted by question author
  1. Luis Rodriguez 6,231 Reputation points Microsoft Employee
    2022-06-10T18:02:42.387+00:00

    Hello @ACDBA

    Welcome to Microsoft Q&A Platform,

    You can check the time it takes to connect including the app response time via curl (Linux), as it follows:

    while :; printf '%(%H:%M:%S)T - '; do curl -o /dev/null -s -w 'Time Connect: %{time_connect} ; time_appconnect: %{time_appconnect} ;Time Total: %{time_total}\n'  "http://8.8.8.8:443" -d {} -H 'content-type:application/json'; sleep 2; done  
    

    Or you can use psping for Windows:

    psping -t -w 0 8.8.8.8:443 |  
      % { $result=("{0} - {1}" -f (Get-Date), $_) |  
        Select-String connecting  
        $result  
      }  
    

    I hope this helps!

    ----------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Luis Rodriguez 6,231 Reputation points Microsoft Employee
    2022-06-10T23:19:19.903+00:00

    I am not familiar with browser tools to measure the network latency, you may want to check the article below about other tools, if using the console is not appropriate for you:

    https://www.comparitech.com/net-admin/network-latency-testing-tools/

    What about a simple ping or tracert test?

    Best regards

    ----------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.