I have a Report Services instance that creates hundreds of jobs. The jobs are in serial format (ie. xxxxxx-xxx-xxxxx-xxxx-xxxx) and clutter up the jobs section view in SSMS. Is there any way to hide these jobs?
I have a Report Services instance that creates hundreds of jobs. The jobs are in serial format (ie. xxxxxx-xxx-xxxxx-xxxx-xxxx) and clutter up the jobs section view in SSMS. Is there any way to hide these jobs?
I followed the steps above, but added a variable inside the sp_help_category stored procedure:
DECLARE @ShowSSRS BIT
SELECT @ShowSSRS = ShowSSRS FROM ShowSSRS
ShowSSRS is a table I added to the msdb database that has one bit field, also named ShowSSRS that will let me toggle between true and false. Typically I set it to false because we have a lot of SSRS reports that clutter the list. When I need to troubleshoot one, I set it to true, refresh and they all appear. I actually have an SSRS report that lists all the jobs, so I know which GUID is for which job.
In the code that is added around line 96/97, I simply check the variable:
IF @ShowSSRS = 0
SET @where_clause += N'
AND
CASE
WHEN
name = ''Report Server''
AND (
SELECT program_name
FROM sys.sysprocesses
where spid = @@spid) = ''Microsoft SQL Server Management Studio'' THEN 0
ELSE 1
END = 1 '