Viewing Jobs running, using a MSSQL Statement

Sometimes we need to view which jobs are running in different contexts like administrative proposes or for data update and we need to see what´s is happening.


USE msdb ;



GO


EXEC dbo.sp_help_job;



Go


USE msdb ;



GO


EXEC dbo.sp_help_job



@job_name=N'MaintenancePlanBackup',   -- Specify the name of your job

@job_aspect=N 'ALL';


GO
/*
Using Multiserver
*/


USE msdb ;

GO


EXEC dbo.sp_help_job

@job_type=N'MULTI-SERVER',
@owner_login_name=N'sa'@enabled=1 , @execution_status=1;


GO


View this link for more information
http://msdn.microsoft.com/en-us/library/ms186722.aspx



/*
View Activity Jobs
*/


USE msdb

GO


EXEC  dbo.sp_help_jobactivity ;


GO


Related Posts: