Hi , I am looking to measure(timing in seconds) how long will take to connect to SQL server from client.
Basically just connect to sql and run select @@version also enough with powershell .
Output looks:
5/07/2021 3:56:29 PM Dbserver- Reply from course: bytes=32 time=1ms TTL=126
This works from ping. but not sure how I caan get it SQL connectivity with timing
ping.exe -t DBServer |Foreach{"{0} - {1}" -f (Get-Date),$_} > C:\DBA\ping\timing.txt
I following way SQL connectivity. but not sure how to get timing (to connect) and direct to a text file until stop
Invoke-Sqlcmd -Query "SELECT GETDATE() AS TimeOfQuery" -ServerInstance "DBServer"