Based on a request by Microsoft Test Consultant Robert George, this SQL Snacks™ along with a tool I am releasing to the community will allow you to run a Transact-SQL workload on Azure SQL Database, capture the xel files to Azure Blob Storage, and then process them to produce an executable Transact-SQL Script that duplicates the captured workload.

The source code (quite simple) is available on my GitHub repo

QueryableXEventData events =
	new QueryableXEventData(inputFileSpec);
using (FileStream f = File.Create(outputFileSpec))
	foreach (PublishedEvent evt in events)
		if (evt.Name == "rpc_starting"
		|| evt.Name == "sql_batch_starting"
		|| evt.Name == "login"
		|| evt.Name == "logout")
	// do some work here. In my case write to the FileStream


WP Twitter Auto Publish Powered By :