To monitor sql server agent job execution not using the gui, you can do the following
SELECT program_name, login_time, host_name
FROM sys.dm_exec_sessions
WHERE status = 'running'
or use the following sp
EXEC msdb.[dbo].[sp_help_job]
@execution_status = 1

0 comentários:
Postar um comentário