The required was very unique and we were able to solve the problem with the help of READPAST query hint. Comprehensive Database Performance Health Check
During the recent work of Comprehensive Database Performance Health Check, we had a very interesting situation of Dynamic SQL and Global Temporary Tables.
Their server got tremendously slow with many sessions suspending in the status of SUSPENDED status and they were waiting on PAGELATCH_UP and PAGELATCH_SH.
SQL Server Expert Ahliana Byrd has written a very interesting script to DROP Multiple Temp Tables Using Cursors on Azure, which we have included today.