• Run this to see what's been using Tempdb and how much space is allocated to that session

    -- how much was allocated and by what user

    SELECT

    sys.dm_exec_sessions.session_id as [Session ID],

    DB_NAME(database_id) as [Database Name],

    host_name as [System Name],

    program_name as [Program Name],

    login_name as [User Name],

    status,

    cpu_time as [CPU Time (in milisec)],

    total_scheduled_time as [Total Scheduled Time (in milisec)],

    total_elapsed_time as [Elapsed Time (in milisec)],

    (memory_usage * 8) as [Memory Usage (in KB)],

    (user_objects_alloc_page_count * 8) as [Space Allocated for User Objects (in KB)],

    (user_objects_dealloc_page_count * 8) as [Space Deallocated for User Objects (in KB)],

    (internal_objects_alloc_page_count * 8) as [Space Allocated for Internal Objects (in KB)],

    (internal_objects_dealloc_page_count * 8) as [Space Deallocated for Internal Objects (in KB)],

    case is_user_process

    when 1 then 'user session'

    when 0 then 'system session'

    end as [Session Type], row_count as [Row Count]

    from sys.dm_db_session_space_usage

    inner join

    sys.dm_exec_sessions

    on sys.dm_db_session_space_usage.session_id = sys.dm_exec_sessions.session_id

    Then match the spid to this query, check the query_text and query_plan, you'll find out what's eating all your space

    select top 10

    t1.session_id,

    t1.request_id,

    t1.task_alloc,

    t1.task_dealloc,

    (SELECT SUBSTRING(text, t2.statement_start_offset/2 + 1,

    (CASE WHEN statement_end_offset = -1

    THEN LEN(CONVERT(nvarchar(max),text)) * 2

    ELSE statement_end_offset

    END - t2.statement_start_offset)/2)

    FROM sys.dm_exec_sql_text(sql_handle)) AS query_text,

    (SELECT query_plan from sys.dm_exec_query_plan(t2.plan_handle)) as query_plan

    from (Select session_id, request_id,

    sum(internal_objects_alloc_page_count + user_objects_alloc_page_count) as task_alloc,

    sum (internal_objects_dealloc_page_count + user_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) and

    t1.session_id > 50

    order by t1.task_alloc DESC