USE [AdventureWorks2014]
GO
select br.request_id, br.status AS ReqStatus, bs.status AS SessStatus, bs.session_id, br.wait_type,  br.wait_time, db_name(br.database_id) as DatabaseName,  bs.program_name AS ProgramName, 
  btx.[text] AS SQLText, 
      (SELECT TOP 1 SUBSTRING(btx.text,statement_start_offset / 2+1 , 
      ( (CASE WHEN statement_end_offset = -1 
         THEN (LEN(CONVERT(nvarchar(max),btx.text)) * 2) 
         ELSE statement_end_offset END)  - statement_start_offset) / 2+1))  AS SQLStatement, bs.[host_name],
		 br.wait_resource, br.command,
br.cpu_time, br.total_elapsed_time, br.reads, br.writes, br.logical_reads, br.granted_query_memory, bs.memory_usage, bc.last_read, bc.last_write,
bc.connect_time, bs.Login_Name, bqp.query_plan, 
  br.session_id, br.blocking_session_id, br.percent_complete, estimated_finish_time = DATEADD(MILLISECOND, br.estimated_completion_time, CURRENT_TIMESTAMP)
  , cp.size_in_bytes, bs.nt_user_name, bs.nt_domain
 FROM sys.dm_exec_sessions AS bs 
      INNER JOIN [master].[sys].[dm_exec_requests] br on bs.session_id = br.session_id
	  INNER JOIN [master].[sys].[dm_exec_connections] bc on bc.connection_id = br.connection_id 
 CROSS APPLY sys.dm_exec_sql_text(br.[sql_handle]) AS btx
CROSS APPLY master.sys.dm_exec_query_plan(br.plan_handle) AS bqp
inner join master.sys.dm_exec_cached_plans cp on cp.plan_handle = br.plan_handle
 WHERE bs.session_id <>  @@spid;
 GO