Our report administrator was looking over some productivity reports that had been scheduled to be emailed to selected managers using the report server subscription option. He had found that the reports had not been emailed in quite some time (although the managers that were supposed to receive the message never notified us!) and were failing with a message that the subscription owner does not exist. The subscriptions had been created by our former report administrator and whose domain account had been removed. Without the active domain account, every subscription created under that user was failing. I submitted as a fix to create a new domain user that would never have to be removed and re-create the subscriptions when logged in under the new account. This however did not fix the problem, as the subscription owner is tied to the owner of the report. Using this method, each report would have to be re-created using the new account. I performed a quick search and came up with this blog which featured the solution. The fix was to update the owner of the subscriptions directly in the subscriptions table in the report server database. I ran the change using the example on that blog and update the owner. We fired off a new subscription on one of the reports and it sent out perfectly.
After this, I started poking around in the report server database, which I have unfortunatley not looked at much in the past. I created a quick query to bring back all of the current subscriptions, their owners, the report they were running under, and what the results of the subscriptions are. Using this I can now at a glance check the status of all our subscriptions and look for failures and other issues. Here’s the query I used:
SELECT
u.UserName, u.UserType, c.Path, c.Description, c.creationDate, c.ModifiedDate, s.modifiedDate, s.Description, s.LastStatus, s.LastRunTime
FROM Subscriptions s
INNER
JOIN Users u
ON
s.ownerid = u.userid
INNER
JOIN Catalog c
ON
s.report_OID = c.ItemID
ORDER
BY u.Username, s.LastRunTime DESC
Hope this helps. Happy reporting!