Here is some more info of your interest.
Query with TEXT and average CPU time for the top five queries.
SELECT TOP 5 total_worker_time/execution_count AS [Avg CPU Time],
SUBSTRING(st.text, (qs.statement_start_offset/2)+1,
((CASE qs.statement_end_offset
WHEN -1 THEN DATALENGTH(st.text)
ELSE qs.statement_end_offset
END - qs.statement_start_offset)/2) + 1) AS statement_text
FROM sys.dm_exec_query_stats AS qs
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS st
ORDER BY total_worker_time/execution_count DESC;
This was taken from http://msdn.microsoft.com/en-us/library/ms181929.aspx
or a simple version such as this one to find the text of all queries with latest Query on top.
Select s.text,* from sys.sysprocesses p
Cross apply sys.dm_exec_sql_text (p.sql_handle) s
where p.spid >50
and p.spid not in (select @@spid)
Order by p.last_batch desc
Or
DECLARE @spid int
SET @spid = (SELECT top 1 SPID from master..sysprocesses order by last_batch desc)
DBCC INPUTBUFFER (@spid)
OR
DECLARE @spid int
DECLARE @handle binary(20)
SET @spid = (SELECT top 1 SPID from master..sysprocesses order by last_batch desc)
SET @handle = (SELECT sql_handle from master..sysprocesses where spid = @spid)
SELECT * FROM ::fn_get_sql(@Handle)
for more infor about the ISOLATION and Lock HINTS http://dbanation.com/?p=114
Maninder
www.dbanation.com