select percent_complete,DATEADD(MILLISECOND,estimated_completion_time,CURRENT_TIMESTAMP) Estimated_finish_time
,(total_elapsed_time/1000)/60 Total_Elapsed_Time_MIN
,T3.text AS Requete,'DBCC INPUTBUFFER (' + cast(spid as varchar(25)) + ')',hostname,nt_username,db_name(T1.dbid) as nombase,'kill ' + CAST(spid AS VARCHAR(25)) AS 'killprocess'
,* from sysprocesses T1
LEFT JOIN sys.dm_exec_requests T2 on T2.session_id=T1.spid
CROSS APPLY sys.dm_exec_sql_text(T1.sql_handle) T3
where T1.dbid in (DB_ID('MaBase'))