Quantcast
Channel: MSDN Blogs
Viewing all articles
Browse latest Browse all 5308

Lesson Learned #30: How to measure a TSQL execution time against Azure SQL Database

$
0
0

Very often, our customers asked about the connection latency or execution time of a query between their servers and their Azure SQL Database. Trying to identify what is the time spent in each step I created this PowerShell Script that measures several counters like Network Server Time, Execution time, Connection Time, etc.. based on the statistics data obtained from the function RetrieveStatistics of SQLClient.SQLConnection 

You could customize modifying the TSQL.SQL with the queries that you want to execute and modifying the PowerShell script you could configure the server, user and password for testing the connection and execution time.

Feel free to add more options and test in this Powershell script.

Enjoy!

 


Viewing all articles
Browse latest Browse all 5308

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>