Solved

Change subscription report delivery to

Posted on 2009-07-06
3
547 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
  • 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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. …
Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now