March 4, 2011 at 12:58 pm
Hi Guys,
Is there a way to find out which query or user is filling up my tempdb database? Because there are a lot of application acessing this server and I need find out who is causing this issue.
att.
Rafael Melo - Br.
March 5, 2011 at 10:35 am
SELECT t1.session_id, t1.request_id, t1.task_alloc,
t1.task_dealloc, t2.sql_handle, t2.statement_start_offset,
t2.statement_end_offset, t2.plan_handle
FROM (Select session_id, request_id,
SUM(internal_objects_alloc_page_count) AS task_alloc,
SUM (internal_objects_dealloc_page_count) AS task_dealloc
FROM sys.dm_db_task_space_usage
GROUP BY session_id, request_id) AS t1,
sys.dm_exec_requests AS t2
WHERE t1.session_id = t2.session_id
AND (t1.request_id = t2.request_id)
ORDER BY t1.task_alloc DESC
Details are here: http://technet.microsoft.com/en-us/library/cc966545.aspx
March 9, 2011 at 7:44 am
Thanks for your replying and your help...
Regards,
Rafael Melo - Br
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply