Live Query Tuning
by Michal Kovaľ on 05/09/2024During last SQL Server Bootcamp 2024 in Brno - our colleague Jan Repka presented a live query tuning session.
Read moreA few weeks ago I had a task to create procedure for testing workload from production server on test environment.It surely wasn't a big deal, but I needed to learn many customer employees to repeat this task on regular basis. I started to look if somehow I could replay SQL trace without using SQL Server Profiler.
I have found one absolutely easy to use solution made by fellow Alex Lee on his webpage.
A tool that replays SQL trace file in console. This tool replays SQL Profiler trace file against local or remote SQL Server
Prerequisites
Syntax
ReplayTrace [/S server] [E | /U login /P password] [/Q] [/N #_Of_Threads] [/M0 | /M1] [/DR0 | /DR1] [/DE0 | /DE1]
SQL trace file (file extension .trc ) /S server Replay will be run against this SQL Server instance /E Use Windows Authentication for /S SQL server /U user SQL login name for /S SQL Server /P pwd SQL login password for /S SQL Server /Q Quiet mode. By default, ReplayTrace displays progress every 10 trace events, but if using this option, the status progress will be suppressed. /N # [Replay Options] Number of replay threads /M0 [Replay Options] Replay events in the order they were traced (Default) /M1 [Replay Options] Replay events using multiple threads (Connection level sync) /DR0 [Replay Options] Disable replay results /DR1 [Replay Options] Display replay results (Default) /DE0 [Replay Options] Disable execution time (Default) /DE1 [Replay Options] Display execution time
Usage
C> ReplayTrace.exe test.trc /S . /E /N 10 /M1 /DR0
You can surely find many other useful tools on Alex web, they are grouped into few categories such a security, profiling, configuration,import/export and search. Also communication with Alex was smooth and flawless, with short reaction times to implement proposed changes.
Hope it helps.
BTW If you will find this tools useful for you as I, don't forget to donate good work.
With Regards,
Mike.
Michal Tinthofer is the face of the Woodler company which (as he does), is fully committed to complete support of Microsoft SQL Server products to its customers. He often acts as a database architect, performance tuner, administrator, SQL Server monitoring developer (Woodler SMT) and, last but not least, a trainer of people who are developing their skills in this area. His current "Quest" is to help admins and developers to quickly and accurately identify issues related to their work and SQL Server runtime.
During last SQL Server Bootcamp 2024 in Brno - our colleague Jan Repka presented a live query tuning session.
Read moreSo after some time we are returning to presenting roadshow starting with Show IT Bratislava. Lets have a look at our session list.
Read moreAnyway this post should focus on some different distressing news about SQL 2012. If you have current software assurance (SA) for SQL Server 2008 R2, this allows you to slide into SQL Server 2012 while maintaining CAL licensing (by the way this is not pos
Read more