I have six thousand reporting services jobs in sqlserver, which were
scheduled to run only once and their execution date is older than a month.
how do I know which of the jobs are useful out of these 6000.
Can I write a job, to purge the reporting services jobs older than a month
and schedule it to run every week, basically how do I manage these ever
growing jobs ?
Thanks in advance..GAis it okay to delete the subscriptions like below '
delete from reportserver..subscriptions
WHERE ModifiedDate < dateadd(day, -7, getdate()) AND Description LIKE 'SRS%'
TIA
"DallasBlue" wrote:
> I have six thousand reporting services jobs in sqlserver, which were
> scheduled to run only once and their execution date is older than a month.
> how do I know which of the jobs are useful out of these 6000.
> Can I write a job, to purge the reporting services jobs older than a month
> and schedule it to run every week, basically how do I manage these ever
> growing jobs ?
>
> Thanks in advance..GA
>|||I have deleted subscriptions using this method. There are cascading deletes
when to remove the related records in ReportSchedule and Schedule tables.
Though, bulk deleting a lot of subscriptions at the same time might not work
with that statement. I know for me I've gotten timeouts when trying a direct
delete. So instead, I create a memory table (DECLARE @.x TABLE...) and put in
all the SubscriptionID for the ones I want to delete. Then I delete from the
Subscription table using a join to the memory table. I know it might seem
strange to do it that way, but because of the way the tables are indexed, it
works.
Once you the records are deleted from the tables, the Reporting Service will
automatically delete the actual SQL Agent jobs when it does its maintenance,
I'm not sure of the frequency that it does that, but at minimum its once a
day.
Carmine
"DallasBlue" wrote:
> is it okay to delete the subscriptions like below '
> delete from reportserver..subscriptions
> WHERE ModifiedDate < dateadd(day, -7, getdate()) AND Description LIKE 'SRS%'
> TIA
> "DallasBlue" wrote:
> > I have six thousand reporting services jobs in sqlserver, which were
> > scheduled to run only once and their execution date is older than a month.
> > how do I know which of the jobs are useful out of these 6000.
> > Can I write a job, to purge the reporting services jobs older than a month
> > and schedule it to run every week, basically how do I manage these ever
> > growing jobs ?
> >
> >
> > Thanks in advance..GA
> >
> >
Sunday, February 12, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment