Solved

Change subscription report delivery to

Posted on 2009-07-06
3
552 Views
Last Modified: 2012-05-07
We're running SQL Server Reporting Services 2005.

We've replaced an employee so they need to get all the subscriptions of their predecessor.  Is there SQL I can run that will change the delivery recipients on all the subscriptions?

Ideally I'd run something like:
Update Subscriptions
Set DeliveryTo = 'Tom';'Jane'
Where DeliveryTo = 'Tom';'Sue'

Thanks,
 TT
0
Comment
Question by:TommyTupa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Expert Comment

by:andrei_teodorescu
ID: 24791997
update data in Subscriptions table (ReportServer database), [ExtensionSettings] column
here is an example:

<ParameterValues>
<ParameterValue><Name>TO</Name><Value>00225930</Value></ParameterValue>
<ParameterValue><Name>IncludeReport</Name><Value>True</Value></ParameterValue>
<ParameterValue><Name>RenderFormat</Name><Value>EXCEL</Value></ParameterValue>
<ParameterValue><Name>Subject</Name><Value>@ReportName was executed at @ExecutionTime</Value>
</ParameterValue><ParameterValue><Name>IncludeLink</Name><Value>True</Value></ParameterValue>
<ParameterValue><Name>Priority</Name><Value>NORMAL</Value></ParameterValue>
</ParameterValues>

change here <Value>LogonName</Value>

you may want to change [OwnerID] column as well, but you have to lookup in Users table to find corresponding ID
0
 
LVL 11

Expert Comment

by:andrei_teodorescu
ID: 24792001
sorry; so, instead:
<ParameterValue><Name>TO</Name><Value>00225930</Value></ParameterValue>
change to
<ParameterValue><Name>TO</Name><Value>LogonName</Value></ParameterValue>
0
 
LVL 13

Accepted Solution

by:
TommyTupa earned 0 total points
ID: 24820174
Ended up running this:
Update Subscriptions
Set ExtensionSettings =
replace(cast(ExtensionSettings as nvarchar(max)),'PersonX',PersonY'),
Description = Replace(Description,'PersonX','PersonY')
Where SubscriptionID in
(select
        S.[SubscriptionID]
from
    [Subscriptions] S inner join [Catalog] CAT on S.[Report_OID] = CAT.[ItemID]
    left outer join [ActiveSubscriptions] A with (NOLOCK) on S.[SubscriptionID]
= A.[SubscriptionID]
Where ExtensionSettings like '%PersonX%')
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code started out as a fix for a customer that had incoming data that was hunderds of numbers and words long that was to fit in one column. The problem was that the customer did not want to split words or numbers when wrapping in the column. …
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question