the web service and then delete it using the DeleteSubscription method,
there is a job (id'ed by a guid) left in SQL Server Jobs?
Consequently we now have hundres of "orphaned" jobs in our database :-(
A bit more investigation appears to reveal this:
I use data driven subscriptions and create them using CreateDataDrivenSubscription. Therefore I retrieve them using GetDataDrivenSubscriptionProperties. The matchData returned does not contain a scheduleId. Is that correct? Well calling ListSchedules returns an empty row, indicating that the schedules created are not shared, so cannot be deleted using DeleteSchedule anyway. However, and this is where the bug appears to be, the schedules are in the ReportSchedule table and the jobs are in SQL Server. Calling DeleteSubscription does not delete the SQL Server Job, nor does it delete the row from ReportSchedule. Is this a bug? Is there a fix or do I have to delete the row myself and delete the job from SQL Server using DMO or some such hack.
|||The SQL Agent jobs should be deleted when the associated subscription is deleted. There appears to be a problem with your system.
Can you take a peek at Event Viewer and SQLAgent log files and see if there is any incriminating evidence?