SQL Server: Script to find the last Executed Query using SPID

In this post, I am sharing different methods to find last executed query by SPID of SQL Server. When DBA monitoring the server performance or serving any request on the performance issue, the DBA may be required to find last executed query of a particular client. You can find SPID using below commands: [crayon-672911ebebd6c093859922/] Find … Continue reading SQL Server: Script to find the last Executed Query using SPID