Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Change subscription report delivery to

Posted on 2009-07-06
3
Medium Priority
?
561 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 Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

783 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