May 12, 2020 at 6:36 pm
I am testing certain queries to trace blocking chains during the running transactions.
Does anyone know/have a certain simple test script/few queries that will simulate a CHAIN of SPIDs blocking one another?
Likes to play Chess
May 13, 2020 at 7:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
May 14, 2020 at 3:49 pm
Usually you need a couple of scripts. One to do the blocking, one to simulated the blocked.
The easy way for the first script is have aproc that has a WAITFOR in it. Or just open a transaction that requires an exclusive lock in a query window and start that.
For simulating blocked users, a script to query the object locked is used, and then some START commands. This explains a bit: https://www.sqlservercentral.com/articles/executing-multiple-threads-to-create-a-load
You can also use SQLQuery Stress, with a call to the locked object and lots of threads.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply