SELECT request.session_id, request.status, request.blocking_session_id, request.wait_type,
userSessions.login_name, userSessions.host_name, userSessions.program_name,
sqlText.text
FROM sys.dm_exec_requests as request
CROSS APPLY sys.dm_exec_sql_text(request.sql_handle) as sqlText
CROSS APPLY sys.dm_exec_sessions as