MS SQL Server query log
The Problem I need to find the sql query another program was running on the MS SQL Server Database to reverse engineer it. The Solution SELECT t.[text], s.last_execution_time FROM sys.dm_exec_cached_plans AS p INNER JOIN sys.dm_exec_query_stats AS s ON