Is it possible to modify the subscription schedules such that you can avoid
sending reports on non-production days? Holidays, for example? I've got a
few simple subscriptions, each configured to run the reports on 'Every
Weekday'. But, what of the holidays? Is there anyway to account for
holidays, and avoid sending out empty reports?
-- LynnAny thoughts at all? I have a calendar table, I use it like this:
SET DATEFIRST 7
IF DATEPART(WEEKDAY, GETDATE()) BETWEEN 2 AND 6
AND NOT EXISTS (SELECT 1 FROM db.dbo.calendar WHERE dt = CONVERT(CHAR(8),
GETDATE(), 112) AND isholiday = 1)
BEGIN
EXEC ......
END
Thus I am able to avoid running certain items on non-production days. As
you know, Reporting Services subscriptions create corresponding SQL Agent
jobs. Can I not preface the tSQL command w/the same thing, like this? :
SET DATEFIRST 7
IF DATEPART(WEEKDAY, GETDATE()) BETWEEN 2 AND 6
AND NOT EXISTS (SELECT 1 FROM db.dbo.calendar WHERE dt = CONVERT(CHAR(8),
GETDATE(), 112) AND isholiday = 1)
BEGIN
exec ReportServer.dbo.AddEvent @.EventType='TimedSubscription',
@.EventData='ace5773f-2dec-4d0e-9d89-b73b42f1db00'
END
My only concern here is that I'm somewhat new to RS, I'm just worried that
modifying the scheduling via SQL Agent may conflict with the RS subscription.
Any ideas, please?
-- Lynn
"Lynn" wrote:
> Is it possible to modify the subscription schedules such that you can avoid
> sending reports on non-production days? Holidays, for example? I've got a
> few simple subscriptions, each configured to run the reports on 'Every
> Weekday'. But, what of the holidays? Is there anyway to account for
> holidays, and avoid sending out empty reports?
> -- Lynn
No comments:
Post a Comment