<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tim laqua dot com &#187; ssrs</title>
	<atom:link href="http://timlaqua.com/tag/ssrs/feed/" rel="self" type="application/rss+xml" />
	<link>http://timlaqua.com</link>
	<description>Thoughts and Code from Tim Laqua</description>
	<lastBuildDate>Fri, 16 Mar 2012 16:48:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Hiding SSRS Schedule Jobs In SSMS</title>
		<link>http://timlaqua.com/2012/01/hiding-ssrs-schedule-jobs-in-ssms/</link>
		<comments>http://timlaqua.com/2012/01/hiding-ssrs-schedule-jobs-in-ssms/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 14:26:16 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[ssrs]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=864</guid>
		<description><![CDATA[Everybody hates these things. If you're in the Activity Monitor or browsing via the SSMS tree view, these GUID jobs that represent SSRS subscriptions are really just none of our concern. Sure, I can admit that I've seen people manually fire these to re-send a given subscription, but you can just do that using the [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody hates these things.  If you're in the Activity Monitor or browsing via the SSMS tree view, these GUID jobs that represent SSRS subscriptions are really just none of our concern.  Sure, I can admit that I've seen people manually fire these to re-send a given subscription, but you can just do that using the AddEvent proc in a query window.  Personally - I don't want to see these... usually...</p>
<p>Connect to the database instance you want to filter the agent jobs out on<br />
Browse to Databases > System Databases > msdb > Programmability > Stored Procedures > System Stored Procedures<br />
Right-click on dbo.sp_help_category and select Modify...</p>
<p>At the top, change the definition of @where_clause to NVARCHAR(MAX)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>19
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;">  <span style="color: #0000FF;">DECLARE</span> @where_clause   <span style="color: #0000FF;">NVARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span></pre></td></tr></table></div>

<p>At the bottom, add in a few lines to append the @where_clause variable with a predicate that filters out the Report Server category when it's you from your workstation (so you can still see that category from another machine if you need to).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;">  <span style="color: #0000FF;">SELECT</span> @cmd <span style="color: #808080;">=</span> @cmd <span style="color: #808080;">+</span> N<span style="color: #FF0000;">'FROM msdb.dbo.syscategories '</span>
&nbsp;
  <span style="color: #0000FF;">SET</span> @where_clause <span style="color: #808080;">+=</span> N<span style="color: #FF0000;">'
  AND
	CASE
		WHEN 
			name = '</span><span style="color: #FF0000;">'Report Server'</span><span style="color: #FF0000;">' 
			AND (
				SELECT RTRIM(nt_username) + '</span><span style="color: #FF0000;">'|'</span><span style="color: #FF0000;">' + RTRIM(hostname) 
				FROM sys.sysprocesses 
				where spid = @@spid) = '</span><span style="color: #FF0000;">'tlaqua|TIMSLAPTOP'</span><span style="color: #FF0000;">'  THEN 0
		ELSE 1
	END = 1 '</span>
&nbsp;
  <span style="color: #008080;">-- Execute the query</span>
  <span style="color: #0000FF;">EXECUTE</span> <span style="color: #808080;">&#40;</span>@cmd <span style="color: #808080;">+</span> @where_clause <span style="color: #808080;">+</span> N<span style="color: #FF0000;">'ORDER BY category_type, name'</span><span style="color: #808080;">&#41;</span>
&nbsp;
  <span style="color: #0000FF;">RETURN</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">@@ERROR</span><span style="color: #808080;">&#41;</span> <span style="color: #008080;">-- 0 means success</span>
<span style="color: #0000FF;">END</span></pre></td></tr></table></div>

<p>So, what on earth are we doing here?  First, replace my nt_username with yours and replace my hostname with yours.  From my less-than-exhaustive trial and error testing, it seems that when either the SSMS Jobs node is expanded or the Job Activity Monitor fetches jobs, two DB calls are made - one to fetch categories and another to fetch jobs.  I tried filtering out the jobs portion originally and that yielded some errors.  So I'm assuming it's trying to marry the categories and the jobs internally, and it expects there to be jobs for each category the first query returned.  By not returning the Report Server category at all, the resulting merged list of jobs doesn't contain any jobs belonging to that category (logically an INNER JOIN).</p>
<p>Sure, this is a dirty hack, but I don't mind.</p>
<p><strong>Update (2012-01-11)</strong><br />
<em>Here is the predicate for hiding those jobs from ALL SSMS clients:</em></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>96
97
98
99
100
101
102
103
104
105
106
</pre></td><td class="code"><pre class="tsql" style="font-family:monospace;">  <span style="color: #0000FF;">SET</span> @where_clause <span style="color: #808080;">+=</span> N<span style="color: #FF0000;">'
  AND
	CASE
		WHEN 
			name = '</span><span style="color: #FF0000;">'Report Server'</span><span style="color: #FF0000;">' 
			AND (
				SELECT program_name 
				FROM sys.sysprocesses 
				where spid = @@spid) = '</span><span style="color: #FF0000;">'Microsoft SQL Server Management Studio'</span><span style="color: #FF0000;">'  THEN 0
		ELSE 1
	END = 1 '</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2012/01/hiding-ssrs-schedule-jobs-in-ssms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pattern for Conditionally Sending SSRS Subscriptions</title>
		<link>http://timlaqua.com/2011/10/pattern-for-conditionally-sending-ssrs-subscriptions/</link>
		<comments>http://timlaqua.com/2011/10/pattern-for-conditionally-sending-ssrs-subscriptions/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 20:51:34 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[ssrs]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=768</guid>
		<description><![CDATA[This is a pretty common request - send the report if there's an issue, don't send it if there's not an issue. This is a simple pattern for doing that using Data Driven Subscriptions. Here, we're not using the data driven subscription to dynamically populate recipient and parameter information, we're just using it to suppress [...]]]></description>
			<content:encoded><![CDATA[<p>This is a pretty common request - send the report if there's an issue, don't send it if there's not an issue.  This is a simple pattern for doing that using Data Driven Subscriptions.  Here, we're not using the data driven subscription to dynamically populate recipient and parameter information, we're just using it to suppress the sending of the report if the report has no value.</p>
<p>To do this, we only need one thing - a query that returns one row if the report should be sent and zero rows if the report should not be sent.  Here is an example - Let's say I want to send a report out if a JDE Address Book record with an AT1 of 'DC' has been updated after a certain julian date.</p>
<p>First, write a query to return rows meeting that criteria:<span id="more-768"></span></p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #808080;">*</span>
<span style="color: #0000FF;">FROM</span> LIB.<span style="color: #202020;">F0101</span>
<span style="color: #0000FF;">WHERE</span> ABAT1 <span style="color: #808080;">=</span> <span style="color: #FF0000;">'DC'</span>
	<span style="color: #808080;">AND</span> ABUPMJ <span style="color: #808080;">&gt;=</span> <span style="color: #000;">111292</span></pre></div></div>

<p>That's great, but it can return multiple rows...  So just select the first record (because all we care about is if we have one or more than one - exactly how many is irrelevant).  We also don't care what the column values are, so just select some arbitrary value.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #0000FF;">TOP</span> <span style="color: #000;">1</span> <span style="color: #000;">1</span> <span style="color: #0000FF;">AS</span> DoStuff
<span style="color: #0000FF;">FROM</span> LIB.<span style="color: #202020;">F0101</span>
<span style="color: #0000FF;">WHERE</span> ABAT1 <span style="color: #808080;">=</span> <span style="color: #FF0000;">'DC'</span>
	<span style="color: #808080;">AND</span> ABUPMJ <span style="color: #808080;">&gt;=</span> <span style="color: #000;">111292</span></pre></div></div>

<p>So now we have what we need in SQL - let me add one final note on this for those DB2 users out there.  DB2 doesn't understand "TOP" so we have to use their syntax, FETCH FIRST (and likewise for MySQL, use LIMIT).</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">SELECT</span> <span style="color: #000;">1</span> <span style="color: #0000FF;">AS</span> DoStuff
<span style="color: #0000FF;">FROM</span> LIB.<span style="color: #202020;">F0101</span>
<span style="color: #0000FF;">WHERE</span> ABAT1 <span style="color: #808080;">=</span> <span style="color: #FF0000;">'DC'</span>
	<span style="color: #808080;">AND</span> ABUPMJ <span style="color: #808080;">&gt;=</span> <span style="color: #000;">111292</span>
<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">FIRST</span> <span style="color: #000;">1</span> <span style="color: #0000FF;">ROWS</span> <span style="color: #0000FF;">ONLY</span></pre></div></div>

<p>Now, you're ready to create your subscription.</p>
<h6>Go in to your report Subscriptions and click on the New Data Driven Subscription button</h6>
<p><a style="padding-left: 3px; border-left: 5px solid #bbbbbb; display: block;" href="http://timlaqua.com/wp-content/uploads/2011/10/DataDrivenSubscriptionButton.png"><img src="http://timlaqua.com/wp-content/uploads/2011/10/DataDrivenSubscriptionButton.png" alt="" title="DataDrivenSubscriptionButton" width="482" height="31" class="alignnone size-full wp-image-771" /></a></p>
<h6>Enter meaningful name and select Shared Data Source</h6>
<p><a style="padding-left: 3px; border-left: 5px solid #bbbbbb; display: block;" href="http://timlaqua.com/wp-content/uploads/2011/10/Step1-GeneralOptions.png"><img src="http://timlaqua.com/wp-content/uploads/2011/10/Step1-GeneralOptions.png" alt="" title="Step1-GeneralOptions" width="660" height="308" class="alignnone size-full wp-image-772" /></a><br />
<em>* If you don't use shared data sources - you should <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </em></p>
<h6>Select Shared Data Source</h6>
<p><a style="padding-left: 3px; border-left: 5px solid #bbbbbb; display: block;" href="http://timlaqua.com/wp-content/uploads/2011/10/Step2-DataSource.png"><img src="http://timlaqua.com/wp-content/uploads/2011/10/Step2-DataSource.png" alt="" title="Step2-DataSource" width="491" height="99" class="alignnone size-full wp-image-773" /></a><br />
<em>* I really hope you don't have a shared data source called "local" - this is just an example</em></p>
<h6>Enter query we developed above</h6>
<p><a style="padding-left: 3px; border-left: 5px solid #bbbbbb; display: block;" href="http://timlaqua.com/wp-content/uploads/2011/10/Step3-Query.png"><img src="http://timlaqua.com/wp-content/uploads/2011/10/Step3-Query.png" alt="" title="Step3-Query" width="629" height="530" class="alignnone size-full wp-image-774" /></a></p>
<h6>Enter the usual options - all static values</h6>
<p><a style="padding-left: 3px; border-left: 5px solid #bbbbbb; display: block;" href="http://timlaqua.com/wp-content/uploads/2011/10/Step4-SubscriptionOptions.png"><img src="http://timlaqua.com/wp-content/uploads/2011/10/Step4-SubscriptionOptions.png" alt="" title="Step4-SubscriptionOptions" width="574" height="537" class="alignnone size-full wp-image-775" /></a></p>
<h6>Enter parameters - usually just "Use Default"</h6>
<p><a style="padding-left: 3px; border-left: 5px solid #bbbbbb; display: block;" href="http://timlaqua.com/wp-content/uploads/2011/10/Step5-Parameters.png"><img src="http://timlaqua.com/wp-content/uploads/2011/10/Step5-Parameters.png" alt="" title="Step5-Parameters" width="546" height="210" class="alignnone size-full wp-image-776" /></a><br />
<em>* This is one drawback to the pattern, you have to type in your parameter(s) - no dropdowns here if you're not using the default</em></p>
<h6>Select your schedule type</h6>
<p><a style="padding-left: 3px; border-left: 5px solid #bbbbbb; display: block;" href="http://timlaqua.com/wp-content/uploads/2011/10/Step6-ChooseSchedule.png"><img src="http://timlaqua.com/wp-content/uploads/2011/10/Step6-ChooseSchedule.png" alt="" title="Step6-ChooseSchedule" width="488" height="137" class="alignnone size-full wp-image-777" /></a></p>
<h6>And finally the usual timed schedule options</h6>
<p><a style="padding-left: 3px; border-left: 5px solid #bbbbbb; display: block;" href="http://timlaqua.com/wp-content/uploads/2011/10/Step7-DefineSchedule.png"><img src="http://timlaqua.com/wp-content/uploads/2011/10/Step7-DefineSchedule.png" alt="" title="Step7-DefineSchedule" width="520" height="541" class="alignnone size-full wp-image-778" /></a></p>
<p>The schedule you specify will be both the time when the above query is executed to see if the report should be sent as well as the time the report will be sent out (assuming it should be sent out).  As far as who the report is sent to, 99% of the time this should be a distribution list that can be managed elsewhere.  You don't want to be wading through SSRS to update the list of subscribed users (unless you're the only subscribed user... then go ahead).</p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2011/10/pattern-for-conditionally-sending-ssrs-subscriptions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Script for Ad-Hoc SSRS TimedSubscription Scheduling</title>
		<link>http://timlaqua.com/2011/10/script-for-ad-hoc-ssrs-timedsubscription-scheduling/</link>
		<comments>http://timlaqua.com/2011/10/script-for-ad-hoc-ssrs-timedsubscription-scheduling/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 19:16:04 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[ssrs]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=754</guid>
		<description><![CDATA[Quick script to locate and execute SSRS timed subscriptions (useful for testing). 1. Execute the top (uncommented) part and identify which subscription you want to schedule. 2. Paste the SubscriptionId from that row in to the @id variable in the lower section 3. Run the entire lower (commented) section DECLARE @ReportName VARCHAR&#40;255&#41; = 'Report Name' [...]]]></description>
			<content:encoded><![CDATA[<p>Quick script to locate and execute SSRS timed subscriptions (useful for testing).</p>
<p>1. Execute the top (uncommented) part and identify which subscription you want to schedule.<br />
2. Paste the SubscriptionId from that row in to the @id variable in the lower section<br />
3. Run the entire lower (commented) section</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #0000FF;">DECLARE</span> @ReportName <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'Report Name'</span>
&nbsp;
<span style="color: #0000FF;">SELECT</span>
      a.<span style="color: #0000FF;">PATH</span>
      ,b.<span style="color: #202020;">SubscriptionID</span> 
      ,b.<span style="color: #202020;">Description</span>
      ,<span style="color: #0000FF;">CAST</span><span style="color: #808080;">&#40;</span>b.<span style="color: #0000FF;">PARAMETERS</span> <span style="color: #0000FF;">AS</span> XML<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> <span style="color: #808080;">&#91;</span><span style="color: #0000FF;">PARAMETERS</span><span style="color: #808080;">&#93;</span>
      ,b.<span style="color: #202020;">LastRunTime</span>
      ,b.<span style="color: #202020;">LastStatus</span>
      ,<span style="color: #0000FF;">CAST</span><span style="color: #808080;">&#40;</span>b.<span style="color: #202020;">ExtensionSettings</span> <span style="color: #0000FF;">AS</span> XML<span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">AS</span> <span style="color: #808080;">&#91;</span>ExtensionSettings<span style="color: #808080;">&#93;</span>
<span style="color: #0000FF;">FROM</span> ReportServer.<span style="color: #202020;">dbo</span>.<span style="color: #808080;">&#91;</span><span style="color: #0000FF;">CATALOG</span><span style="color: #808080;">&#93;</span> a
      <span style="color: #0000FF;">INNER</span> <span style="color: #808080;">JOIN</span> ReportServer.<span style="color: #202020;">dbo</span>.<span style="color: #808080;">&#91;</span>Subscriptions<span style="color: #808080;">&#93;</span> b
            <span style="color: #0000FF;">ON</span> b.<span style="color: #202020;">Report_OID</span> <span style="color: #808080;">=</span> a.<span style="color: #202020;">ItemID</span>
<span style="color: #0000FF;">WHERE</span> a.<span style="color: #202020;">Name</span> <span style="color: #808080;">=</span> @ReportName
&nbsp;
<span style="color: #008080;">/*
DECLARE 
       @id varchar(260) = ''
      ,@Type VARCHAR(32)                  = 'TimedSubscription'
&nbsp;
EXEC [ReportServer].dbo.AddEvent @EventType=@Type, @EventData=@id
&nbsp;
*/</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2011/10/script-for-ad-hoc-ssrs-timedsubscription-scheduling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Troubleshooting Kerberos Configuration for SSRS</title>
		<link>http://timlaqua.com/2011/04/troubleshooting-kerberos-configuration-for-ssrs/</link>
		<comments>http://timlaqua.com/2011/04/troubleshooting-kerberos-configuration-for-ssrs/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 15:11:44 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[ssrs]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=588</guid>
		<description><![CDATA[I recently worked with Dave DuVarney while he was configuring one of our Reporting Services instances for Kerberos authentication. While working through it, he suggested we take a look at network traffic to see what's actually happening. Turns out, that DuVarney fellow has some clever ideas now and then We used Network Monitor 3.4 for [...]]]></description>
			<content:encoded><![CDATA[<p>I recently worked with <a href="http://www.linkedin.com/in/daveduvarney">Dave DuVarney</a> while he was configuring one of our Reporting Services instances for Kerberos authentication.  While working through it, he suggested we take a look at network traffic to see what's actually happening.  Turns out, that DuVarney fellow has some clever ideas now and then <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>We used <a href="http://blogs.technet.com/b/netmon/p/downloads.aspx">Network Monitor 3.4</a> for our tests and really weren't 100% on what we were looking for.  Examining traffic over the KerberosV5 protocol, you'll always seem some chatter from the krbtgt as it does whatever it does, but other than that, we just kind of captured and sifted.  Here are a few examples of what we saw:<span id="more-588"></span></p>
<p>First, create some Color Rules so it looks pretty:<br />
<a href="http://timlaqua.com/wp-content/uploads/2011/04/NetworkMonitor-ColorRules.png"><img src="http://timlaqua.com/wp-content/uploads/2011/04/NetworkMonitor-ColorRules.png" alt="" title="NetworkMonitor-ColorRules" width="447" height="500" class="alignnone size-full wp-image-589" /></a></p>
<p>Next, add the text "KerberosV5" to the Display Filter and click Apply.  Then Start the capture and make sure you click on "All Traffic" in the Network Conversation pane (the Frame Summary only displays traffic for the conversation(s) you have selected in that pane):<br />
<a href="http://timlaqua.com/wp-content/uploads/2011/04/NetworkConversations-AllTraffic.png"><img src="http://timlaqua.com/wp-content/uploads/2011/04/NetworkConversations-AllTraffic.png" alt="" title="NetworkConversations-AllTraffic" width="183" height="172" class="alignnone size-full wp-image-590" /></a></p>
<p>Finally, attempt to connect to Report Manger on the SSRS instance you're configuring (you must have the RSWindowsNegotiate authentication type at the top of the authentication list in the RS config).</p>
<p><em>This is an example of a failed authentication (yields the notorious "blank screen" issue) when capturing traffic on the <strong>client</strong> machine:</em><br />
<a href="http://timlaqua.com/wp-content/uploads/2011/04/NetworkMonitor-KerberosFail_blackout.png"><img src="http://timlaqua.com/wp-content/uploads/2011/04/NetworkMonitor-KerberosFail_blackout.png" alt="" title="NetworkMonitor-KerberosFail_blackout" width="720" height="520" class="alignnone size-full wp-image-591" /></a></p>
<p><em>This is an example of a successful authentication when capturing traffic on the <strong>client</strong> machine:</em><br />
<a href="http://timlaqua.com/wp-content/uploads/2011/04/NetworkMonitor-KerberosOk_blackout.png"><img src="http://timlaqua.com/wp-content/uploads/2011/04/NetworkMonitor-KerberosOk_blackout.png" alt="" title="NetworkMonitor-KerberosOk_blackout" width="720" height="393" class="alignnone size-full wp-image-592" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2011/04/troubleshooting-kerberos-configuration-for-ssrs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reporting Services Source Control 1.0</title>
		<link>http://timlaqua.com/2011/04/reporting-services-source-control-1-0/</link>
		<comments>http://timlaqua.com/2011/04/reporting-services-source-control-1-0/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 11:30:50 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[ssrs]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=503</guid>
		<description><![CDATA[Reporting Services Source Control is an application to create copies of all the reports stored in your Report Manager and commit them to source control (SVN is the only supported source control in the 1.0 release). The need for this arises for two reasons: First, we empower our users to create reports using Report Builder [...]]]></description>
			<content:encoded><![CDATA[<p>Reporting Services Source Control is an application to create copies of all the reports stored in your Report Manager and commit them to source control (SVN is the only supported source control in the 1.0 release).  The need for this arises for two reasons:</p>
<ul>
<li>First, we empower our users to create reports using Report Builder and those reports usually only exist the ReportServer database.  </li>
<li>Second, Report Builder has matured so well that it is no longer very beneficial to create a Report Server project using Business Intelligence Development Studio (BIDS).</li>
</ul>
<p>So now we have intellectual property generated by both end users and developers sitting in Report Manager with no version control whatsoever.  Reporting Services Source Control addresses this by scripting out reports, subscriptions, and other properties and committing them to source control.<span id="more-503"></span></p>
<p>The application and source code is available on Codeplex: <a href="http://rssc.codeplex.com/">Reporting Services Source Control</a></p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2011/04/reporting-services-source-control-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring Failed Report Server Subscriptions</title>
		<link>http://timlaqua.com/2011/04/monitoring-failed-report-server-subscriptions/</link>
		<comments>http://timlaqua.com/2011/04/monitoring-failed-report-server-subscriptions/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 11:30:51 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[ssrs]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=465</guid>
		<description><![CDATA[While we love to empower our users as much as possible, we still need to pay attention to them and what they're up to. The first place I usually see users running amok as Microsoft BI adoption grows in organization is the Report Subscriptions in SSRS. They go nuts with them. I was at one [...]]]></description>
			<content:encoded><![CDATA[<p>While we love to empower our users as much as possible, we still need to pay attention to them and what they're up to.  The first place I usually see users running amok as Microsoft BI adoption grows in organization is the Report Subscriptions in SSRS.  They go nuts with them.  I was at one company where 50% of the report subscriptions went to users outside of the company - that means our customers were depending on these subscriptions!  Which brings up an interesting licensing debacle...  but that's another story.  Needless to say, when people set up a subscription, they expect it to work.  If it doesn't, we REALLY need to let someone know.</p>
<p>Here, we have a procedure to monitor for Reporting Services subscription failures.  Specifically, email subscription failures.  When a failed subscription is detected, an email is sent to both the subscription owner and a digest of failures is sent to the specified admin group.<span id="more-465"></span></p>
<p>This procedure has saved me so many times it's not even funny.  The last thing you want is your end users knowing about a failure before you.</p>

<div class="wp_syntax"><div class="code"><pre class="tsql" style="font-family:monospace;"><span style="color: #008080;">/************************************************************************
***
*** Procedure:       Alert_FailedReportingServicesSubscriptions
*** Purpose:         Notifies administrators and subscription owners that
***                  subscriptions were not delivered as expected
***      
*** Author:          tl
*** Date Created:    2009-10-28
*** 
*** Revision History
*** Date        Author   Description
*** 2009-10-28  tl       Created
*** 
************************************************************************/</span>
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">PROCEDURE</span> <span style="color: #808080;">&#91;</span>dbo<span style="color: #808080;">&#93;</span>.<span style="color: #808080;">&#91;</span>Alert_FailedReportingServicesSubscriptions<span style="color: #808080;">&#93;</span>
   @ReportServerBaseURL <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1024</span><span style="color: #808080;">&#41;</span>
  ,@AdminEmail <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
  ,@FromAddress <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
  ,@MailDomain <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
  ,@NTDomain <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
  ,@ReportServerDatabase <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'ReportServer'</span>
  ,@ReportServerSchema <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'dbo'</span>
  ,@HoursToCheck <span style="color: #0000FF;">INT</span> <span style="color: #808080;">=</span> <span style="color: #000;">1</span>
  ,@HourSchedule <span style="color: #0000FF;">INT</span> <span style="color: #808080;">=</span> <span style="color: #000;">16777215</span>
<span style="color: #0000FF;">AS</span>
<span style="color: #0000FF;">BEGIN</span>
  <span style="color: #0000FF;">SET</span> <span style="color: #0000FF;">NOCOUNT</span> <span style="color: #0000FF;">ON</span>;
&nbsp;
  <span style="color: #0000FF;">IF</span> @HourSchedule <span style="color: #808080;">&amp;</span> <span style="color: #FF00FF;">POWER</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2</span>, <span style="color: #FF00FF;">DATEPART</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">HOUR</span>, <span style="color: #FF00FF;">GETDATE</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">&gt;</span> <span style="color: #000;">0</span>
  <span style="color: #0000FF;">BEGIN</span>
    <span style="color: #0000FF;">DECLARE</span> @ReportTableOpen <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span>
    <span style="color: #FF0000;">'&lt;style&gt;
    table { font-family: Calibri, Verdana, Ariel, sans-serif;  font-size: 90%; }
    th { padding-left: 3pt; font-style: italic; text-align: left; border-bottom: 1px solid black;}
    td { padding-left: 3pt; white-space: nowrap; }
    p { font-family: Calibri, Verdana, Ariel, sans-serif;  font-size: 95%; text-indent: 0pt; margin-bottom: 12pt; }
    &lt;/style&gt;
    &lt;p&gt;The following subscription(s) that you created was/were not sent to specified recipients at the date/time you scheduled.  Database Administrators has been notified.  Please reply to this email if you have any questions.&lt;/p&gt;
    &lt;table&gt;
    &lt;tr&gt;&lt;th&gt;Owner&lt;/th&gt;&lt;th&gt;Report&lt;/th&gt;&lt;th&gt;Last Run&lt;/th&gt;&lt;th&gt;Intended Recipients&lt;/th&gt;&lt;th&gt;Status&lt;/th&gt;&lt;/tr&gt;'</span>
&nbsp;
    <span style="color: #0000FF;">DECLARE</span> @ReportTableClose <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'&lt;/table&gt;'</span>
&nbsp;
    <span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> #FailedReport
      <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>Id<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">INT</span> <span style="color: #0000FF;">IDENTITY</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>,<span style="color: #000;">1</span><span style="color: #808080;">&#41;</span>
      ,<span style="color: #808080;">&#91;</span>Name<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
      ,<span style="color: #808080;">&#91;</span>Link<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2048</span><span style="color: #808080;">&#41;</span>
      ,<span style="color: #808080;">&#91;</span>LastRunTime<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">DATETIME</span>
      ,<span style="color: #808080;">&#91;</span>OwnerUsername<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
      ,<span style="color: #808080;">&#91;</span>IntendedRecipients<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1024</span><span style="color: #808080;">&#41;</span>
      ,<span style="color: #808080;">&#91;</span>Message<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1024</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
&nbsp;
&nbsp;
    <span style="color: #0000FF;">DECLARE</span> @<span style="color: #0000FF;">SQL</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">'
    INSERT INTO #FailedReport
      ([Name]
      ,[Link]
      ,[LastRunTime]
      ,[OwnerUsername]
      ,[IntendedRecipients]
      ,[Message])
    SELECT
       b.Name
      ,'</span><span style="color: #FF0000;">'&lt;a href=&quot;'</span> <span style="color: #808080;">+</span> @ReportServerBaseURL <span style="color: #808080;">+</span> <span style="color: #FF0000;">''</span><span style="color: #FF0000;">' + b.Path + '</span><span style="color: #FF0000;">'&quot;&gt;'</span><span style="color: #FF0000;">' + b.Name + '</span><span style="color: #FF0000;">'&lt;/a&gt;'</span><span style="color: #FF0000;">' AS [Link]
      ,LastRunTime 
      ,REPLACE(c.UserName, '</span><span style="color: #FF0000;">''</span> <span style="color: #808080;">+</span> @NTDomain <span style="color: #808080;">+</span> <span style="color: #0000FF;">CHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">92</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">''</span><span style="color: #FF0000;">', '</span><span style="color: #FF0000;">''</span><span style="color: #FF0000;">') AS [OwnerUserName]
      ,REPLACE(CAST(ExtensionSettings AS XML).value
        ('</span><span style="color: #FF0000;">'(//ParameterValue[Name=&quot;TO&quot;]/Value)[1]'</span><span style="color: #FF0000;">'
        ,'</span><span style="color: #FF0000;">'VARCHAR(1024)'</span><span style="color: #FF0000;">')
      + '</span><span style="color: #FF0000;">';'</span><span style="color: #FF0000;">' 
      + ISNULL(CAST(ExtensionSettings AS XML).value
        ('</span><span style="color: #FF0000;">'(//ParameterValue[Name=&quot;CC&quot;]/Value)[1]'</span><span style="color: #FF0000;">'
        ,'</span><span style="color: #FF0000;">'VARCHAR(1024)'</span><span style="color: #FF0000;">'), '</span><span style="color: #FF0000;">''</span><span style="color: #FF0000;">'),'</span><span style="color: #FF0000;">';;'</span><span style="color: #FF0000;">','</span><span style="color: #FF0000;">';'</span><span style="color: #FF0000;">') AS [IntendedRecipients]
      ,LEFT(ISNULL(LastStatus, '</span><span style="color: #FF0000;">''</span><span style="color: #FF0000;">'), 1024) AS [Message]
    FROM '</span> <span style="color: #808080;">+</span> @ReportServerDatabase <span style="color: #808080;">+</span> <span style="color: #FF0000;">'.'</span> <span style="color: #808080;">+</span> @ReportServerSchema <span style="color: #808080;">+</span> <span style="color: #FF0000;">'.Subscriptions a
      INNER JOIN '</span> <span style="color: #808080;">+</span> @ReportServerDatabase <span style="color: #808080;">+</span> <span style="color: #FF0000;">'.'</span> <span style="color: #808080;">+</span> @ReportServerSchema <span style="color: #808080;">+</span> <span style="color: #FF0000;">'.Catalog b WITH(NOLOCK) 
        ON a.Report_OID=b.ItemId
      INNER JOIN '</span> <span style="color: #808080;">+</span> @ReportServerDatabase <span style="color: #808080;">+</span> <span style="color: #FF0000;">'.'</span> <span style="color: #808080;">+</span> @ReportServerSchema <span style="color: #808080;">+</span> <span style="color: #FF0000;">'.Users c WITH(NOLOCK)
        ON a.OwnerID = c.UserID
    WHERE 
      a.DeliveryExtension = '</span><span style="color: #FF0000;">'Report Server Email'</span><span style="color: #FF0000;">'
      AND LastStatus NOT LIKE '</span><span style="color: #FF0000;">'Mail Sent%'</span><span style="color: #FF0000;">' 
      AND LastStatus NOT LIKE '</span><span style="color: #FF0000;">'% 0 errors.'</span><span style="color: #FF0000;">'
      AND LastStatus NOT LIKE '</span><span style="color: #FF0000;">'New Sub%'</span><span style="color: #FF0000;">'
      AND LastStatus NOT LIKE '</span><span style="color: #FF0000;">'Pending%'</span><span style="color: #FF0000;">'
      AND LastRunTime &gt;= DATEADD(HOUR, -1 * '</span> <span style="color: #808080;">+</span> <span style="color: #0000FF;">CAST</span><span style="color: #808080;">&#40;</span>@HoursToCheck <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">10</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">', GETDATE())
    ORDER BY REPLACE(c.UserName, '</span><span style="color: #FF0000;">''</span> <span style="color: #808080;">+</span> @NTDomain <span style="color: #808080;">+</span> <span style="color: #0000FF;">CHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">92</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">''</span><span style="color: #FF0000;">', '</span><span style="color: #FF0000;">''</span><span style="color: #FF0000;">'), b.Name'</span>
&nbsp;
    <span style="color: #0000FF;">EXECUTE</span><span style="color: #808080;">&#40;</span>@<span style="color: #0000FF;">SQL</span><span style="color: #808080;">&#41;</span>
&nbsp;
    <span style="color: #0000FF;">IF</span> <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">SELECT</span> <span style="color: #FF00FF;">COUNT</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">FROM</span> #FailedReport<span style="color: #808080;">&#41;</span> <span style="color: #808080;">&gt;</span> <span style="color: #000;">0</span>
    <span style="color: #0000FF;">BEGIN</span>
      <span style="color: #0000FF;">DECLARE</span> 
         @FullReportTable <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">''</span>
        ,@LastOwnerId <span style="color: #0000FF;">INT</span> <span style="color: #808080;">=</span> <span style="color: #000;">0</span>
        ,@Username <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
&nbsp;
      <span style="color: #0000FF;">DECLARE</span> @Owner <span style="color: #0000FF;">TABLE</span>
          <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>OwnerId<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">INT</span> <span style="color: #0000FF;">IDENTITY</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>,<span style="color: #000;">1</span><span style="color: #808080;">&#41;</span>
          ,<span style="color: #808080;">&#91;</span>Username<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
&nbsp;
      <span style="color: #0000FF;">DECLARE</span> @Notification <span style="color: #0000FF;">TABLE</span>
        <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>NotificationId<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">INT</span> <span style="color: #0000FF;">IDENTITY</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>,<span style="color: #000;">1</span><span style="color: #808080;">&#41;</span>
        ,<span style="color: #808080;">&#91;</span><span style="color: #0000FF;">TO</span><span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
        ,<span style="color: #808080;">&#91;</span>Body<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
&nbsp;
      <span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> @Owner
        <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>Username<span style="color: #808080;">&#93;</span><span style="color: #808080;">&#41;</span>
      <span style="color: #0000FF;">SELECT</span> <span style="color: #0000FF;">DISTINCT</span> OwnerUsername
      <span style="color: #0000FF;">FROM</span> #FailedReport
      <span style="color: #0000FF;">ORDER</span> <span style="color: #0000FF;">BY</span> OwnerUsername
&nbsp;
      <span style="color: #0000FF;">DECLARE</span> @UserFailedReport <span style="color: #0000FF;">TABLE</span>
        <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>Id<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">INT</span> <span style="color: #0000FF;">IDENTITY</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>,<span style="color: #000;">1</span><span style="color: #808080;">&#41;</span>
        ,<span style="color: #808080;">&#91;</span>Name<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
        ,<span style="color: #808080;">&#91;</span>Link<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">2048</span><span style="color: #808080;">&#41;</span>
        ,<span style="color: #808080;">&#91;</span>LastRunTime<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">DATETIME</span>
        ,<span style="color: #808080;">&#91;</span>OwnerUsername<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
        ,<span style="color: #808080;">&#91;</span>IntendedRecipients<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1024</span><span style="color: #808080;">&#41;</span>
        ,<span style="color: #808080;">&#91;</span>Message<span style="color: #808080;">&#93;</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1024</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>
&nbsp;
      <span style="color: #0000FF;">WHILE</span> <span style="color: #808080;">EXISTS</span> <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">SELECT</span> <span style="color: #0000FF;">TOP</span> <span style="color: #000;">1</span> <span style="color: #000;">1</span> <span style="color: #0000FF;">FROM</span> @Owner <span style="color: #0000FF;">WHERE</span> <span style="color: #808080;">&#91;</span>OwnerId<span style="color: #808080;">&#93;</span> <span style="color: #808080;">&gt;</span> @LastOwnerId<span style="color: #808080;">&#41;</span>
      <span style="color: #0000FF;">BEGIN</span>
        <span style="color: #0000FF;">DELETE</span> <span style="color: #0000FF;">FROM</span> @UserFailedReport
&nbsp;
        <span style="color: #0000FF;">SELECT</span> <span style="color: #0000FF;">TOP</span> <span style="color: #000;">1</span> 
           @Username <span style="color: #808080;">=</span> <span style="color: #808080;">&#91;</span>Username<span style="color: #808080;">&#93;</span>
          ,@LastOwnerId <span style="color: #808080;">=</span> <span style="color: #808080;">&#91;</span>OwnerId<span style="color: #808080;">&#93;</span>
        <span style="color: #0000FF;">FROM</span> @Owner 
        <span style="color: #0000FF;">WHERE</span> <span style="color: #808080;">&#91;</span>OwnerId<span style="color: #808080;">&#93;</span> <span style="color: #808080;">&gt;</span> @LastOwnerId
        <span style="color: #0000FF;">ORDER</span> <span style="color: #0000FF;">BY</span> <span style="color: #808080;">&#91;</span>OwnerId<span style="color: #808080;">&#93;</span>
&nbsp;
        <span style="color: #0000FF;">DECLARE</span> 
           @UserReportTable <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">=</span> <span style="color: #FF0000;">''</span>
          ,@LastId <span style="color: #0000FF;">INT</span> <span style="color: #808080;">=</span> <span style="color: #000;">0</span>
&nbsp;
        <span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> @UserFailedReport
          <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>Name<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>Link<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>LastRunTime<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>OwnerUsername<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>IntendedRecipients<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>Message<span style="color: #808080;">&#93;</span><span style="color: #808080;">&#41;</span>
        <span style="color: #0000FF;">SELECT</span>
           <span style="color: #808080;">&#91;</span>Name<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>Link<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>LastRunTime<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>OwnerUserName<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>IntendedRecipients<span style="color: #808080;">&#93;</span>
          ,<span style="color: #808080;">&#91;</span>Message<span style="color: #808080;">&#93;</span>
        <span style="color: #0000FF;">FROM</span> #FailedReport
        <span style="color: #0000FF;">WHERE</span> <span style="color: #808080;">&#91;</span>OwnerUsername<span style="color: #808080;">&#93;</span> <span style="color: #808080;">=</span> @Username
&nbsp;
        <span style="color: #0000FF;">WHILE</span> <span style="color: #808080;">EXISTS</span> <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">SELECT</span> <span style="color: #0000FF;">TOP</span> <span style="color: #000;">1</span> <span style="color: #000;">1</span> <span style="color: #0000FF;">FROM</span> @UserFailedReport <span style="color: #0000FF;">WHERE</span> <span style="color: #808080;">&#91;</span>Id<span style="color: #808080;">&#93;</span> <span style="color: #808080;">&gt;</span> @LastId<span style="color: #808080;">&#41;</span>
        <span style="color: #0000FF;">BEGIN</span>
&nbsp;
          <span style="color: #0000FF;">SELECT</span> <span style="color: #0000FF;">TOP</span> <span style="color: #000;">1</span>
             @UserReportTable <span style="color: #808080;">+=</span> <span style="color: #FF0000;">'&lt;tr&gt;&lt;td&gt;'</span> <span style="color: #808080;">+</span> IS<span style="color: #808080;">NULL</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'&lt;a href=&quot;mailto:'</span> <span style="color: #808080;">+</span> <span style="color: #808080;">&#91;</span>OwnerUsername<span style="color: #808080;">&#93;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">'@'</span> <span style="color: #808080;">+</span> @MailDomain <span style="color: #808080;">+</span> <span style="color: #FF0000;">'&quot;&gt;'</span> <span style="color: #808080;">+</span> <span style="color: #808080;">&#91;</span>OwnerUsername<span style="color: #808080;">&#93;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">'&lt;/a&gt;'</span>, <span style="color: #FF0000;">'Unknown'</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #808080;">+</span> IS<span style="color: #808080;">NULL</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>Link<span style="color: #808080;">&#93;</span>, <span style="color: #FF0000;">'Unavailable'</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #808080;">+</span> IS<span style="color: #808080;">NULL</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">CONVERT</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">VARCHAR</span>, <span style="color: #808080;">&#91;</span>LastRunTime<span style="color: #808080;">&#93;</span>, <span style="color: #000;">120</span><span style="color: #808080;">&#41;</span>, <span style="color: #FF0000;">'Never'</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #808080;">+</span> IS<span style="color: #808080;">NULL</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>IntendedRecipients<span style="color: #808080;">&#93;</span>, <span style="color: #FF0000;">'Unknown'</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">'&lt;/td&gt;&lt;td&gt;'</span> <span style="color: #808080;">+</span> IS<span style="color: #808080;">NULL</span><span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span>Message<span style="color: #808080;">&#93;</span>,<span style="color: #FF0000;">'Unknown'</span><span style="color: #808080;">&#41;</span> <span style="color: #808080;">+</span> <span style="color: #FF0000;">'&lt;/td&gt;&lt;/tr&gt;'</span> <span style="color: #808080;">+</span> <span style="color: #0000FF;">CHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">13</span><span style="color: #808080;">&#41;</span>
            ,@LastId <span style="color: #808080;">=</span> <span style="color: #808080;">&#91;</span>Id<span style="color: #808080;">&#93;</span>
          <span style="color: #0000FF;">FROM</span> @UserFailedReport
          <span style="color: #0000FF;">WHERE</span> <span style="color: #808080;">&#91;</span>Id<span style="color: #808080;">&#93;</span> <span style="color: #808080;">&gt;</span> @LastId
          <span style="color: #0000FF;">ORDER</span> <span style="color: #0000FF;">BY</span> <span style="color: #808080;">&#91;</span>Id<span style="color: #808080;">&#93;</span>
        <span style="color: #0000FF;">END</span>
&nbsp;
        <span style="color: #0000FF;">SET</span> @FullReportTable <span style="color: #808080;">+=</span> @UserReportTable <span style="color: #808080;">+</span> <span style="color: #0000FF;">CHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">13</span><span style="color: #808080;">&#41;</span>
&nbsp;
        <span style="color: #0000FF;">SET</span> @UserReportTable <span style="color: #808080;">=</span> @ReportTableOpen <span style="color: #808080;">+</span> @UserReportTable <span style="color: #808080;">+</span> @ReportTableClose
&nbsp;
        <span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> @Notification <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span><span style="color: #0000FF;">TO</span><span style="color: #808080;">&#93;</span>, <span style="color: #808080;">&#91;</span>Body<span style="color: #808080;">&#93;</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span>@Username <span style="color: #808080;">+</span> <span style="color: #FF0000;">'@'</span> <span style="color: #808080;">+</span> @MailDomain, @UserReportTable<span style="color: #808080;">&#41;</span>
      <span style="color: #0000FF;">END</span>
&nbsp;
&nbsp;
      <span style="color: #0000FF;">SET</span> @FullReportTable <span style="color: #808080;">=</span> @ReportTableOpen <span style="color: #808080;">+</span> @FullReportTable <span style="color: #808080;">+</span> @ReportTableClose
&nbsp;
      <span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> @Notification <span style="color: #808080;">&#40;</span><span style="color: #808080;">&#91;</span><span style="color: #0000FF;">TO</span><span style="color: #808080;">&#93;</span>, <span style="color: #808080;">&#91;</span>Body<span style="color: #808080;">&#93;</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">VALUES</span> <span style="color: #808080;">&#40;</span>@AdminEmail, @FullReportTable<span style="color: #808080;">&#41;</span>
&nbsp;
      <span style="color: #0000FF;">DECLARE</span> 
         @LastNotificationId <span style="color: #0000FF;">INT</span> <span style="color: #808080;">=</span> <span style="color: #000;">0</span>
        ,@<span style="color: #0000FF;">TO</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>
        ,@Body <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">MAX</span><span style="color: #808080;">&#41;</span>
&nbsp;
      <span style="color: #0000FF;">WHILE</span> <span style="color: #808080;">EXISTS</span> <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">SELECT</span> <span style="color: #0000FF;">TOP</span> <span style="color: #000;">1</span> <span style="color: #000;">1</span> <span style="color: #0000FF;">FROM</span> @Notification <span style="color: #0000FF;">WHERE</span> <span style="color: #808080;">&#91;</span>NotificationId<span style="color: #808080;">&#93;</span> <span style="color: #808080;">&gt;</span> @LastNotificationId<span style="color: #808080;">&#41;</span>
      <span style="color: #0000FF;">BEGIN</span>
&nbsp;
        <span style="color: #0000FF;">SELECT</span> <span style="color: #0000FF;">TOP</span> <span style="color: #000;">1</span> 
           @<span style="color: #0000FF;">TO</span> <span style="color: #808080;">=</span> <span style="color: #808080;">&#91;</span><span style="color: #0000FF;">TO</span><span style="color: #808080;">&#93;</span>
          ,@Body <span style="color: #808080;">=</span> <span style="color: #808080;">&#91;</span>Body<span style="color: #808080;">&#93;</span>
          ,@LastNotificationId <span style="color: #808080;">=</span> <span style="color: #808080;">&#91;</span>NotificationId<span style="color: #808080;">&#93;</span>
        <span style="color: #0000FF;">FROM</span> @Notification
        <span style="color: #0000FF;">WHERE</span> <span style="color: #808080;">&#91;</span>NotificationId<span style="color: #808080;">&#93;</span> <span style="color: #808080;">&gt;</span> @LastNotificationId
        <span style="color: #0000FF;">ORDER</span> <span style="color: #0000FF;">BY</span> <span style="color: #808080;">&#91;</span>NotificationId<span style="color: #808080;">&#93;</span>
&nbsp;
        <span style="color: #0000FF;">EXEC</span> msdb.<span style="color: #202020;">dbo</span>.<span style="color: #202020;">sp_send_dbmail</span>
           @recipients <span style="color: #808080;">=</span> @<span style="color: #0000FF;">TO</span>
          ,@from_address <span style="color: #808080;">=</span> @FromAddress
          ,@subject <span style="color: #808080;">=</span> <span style="color: #FF0000;">'Failed Report Manager Subscription(s)'</span>
          ,@body <span style="color: #808080;">=</span> @Body
          ,@importance <span style="color: #808080;">=</span> <span style="color: #FF0000;">'High'</span>
          ,@body_format <span style="color: #808080;">=</span> <span style="color: #FF0000;">'HTML'</span>  
&nbsp;
        <span style="color: #008080;">--DECLARE @ProcName VARCHAR(255) = OBJECT_NAME(@@PROCID)</span>
&nbsp;
        <span style="color: #008080;">--EXEC [dbo].[Utility_Alert_SendMail] </span>
        <span style="color: #008080;">--   @AlertSubject = 'Failed Report Manager Subscription(s)'</span>
        <span style="color: #008080;">--  ,@AlertRecipients = @To</span>
        <span style="color: #008080;">--  ,@AlertBody = @Body</span>
        <span style="color: #008080;">--  ,@AlertFormat = 'HTML'</span>
        <span style="color: #008080;">--  ,@AlertSource = @ProcName</span>
        <span style="color: #008080;">--  ,@FromAddress = @FromAddress</span>
&nbsp;
      <span style="color: #0000FF;">END</span>
    <span style="color: #0000FF;">END</span>
&nbsp;
    <span style="color: #0000FF;">DROP</span> <span style="color: #0000FF;">TABLE</span> #FailedReport
  <span style="color: #0000FF;">END</span>
<span style="color: #0000FF;">END</span></pre></div></div>

<p>Now to run it:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">EXEC <span style="color: #66cc66;">&#91;</span>Alert_FailedReportingServicesSubscriptions<span style="color: #66cc66;">&#93;</span> 
   @ReportServerBaseURL <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'http://reports.yourcompany.com/Reports/Pages/Report.aspx?ItemPath='</span>
  <span style="color: #66cc66;">,</span>@AdminEmail <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'Business Intelligence &lt;BusinessIntelligence@yourcompany.com&gt;'</span>
  <span style="color: #66cc66;">,</span>@FromAddress <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'Business Intelligence &lt;BusinessIntelligence@yourcompany.com&gt;'</span>
  <span style="color: #66cc66;">,</span>@MailDomain <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'yourcompany.com'</span>
  <span style="color: #66cc66;">,</span>@NTDomain <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'AWESOMECO'</span></pre></div></div>

<p><em>Set paramaters as follows:</em></p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">@ReportServerBaseURL VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1024</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">-- The url string needed view a report (including the ItemPath querystring variable</span>
<span style="color: #808080; font-style: italic;">-- An example is 'http://reports.yourcompany.com/Reports/Pages/Report.aspx?ItemPath='</span>
<span style="color: #808080; font-style: italic;">-- You can obtain this by simply viewing a report and looking at the address bar	</span>
&nbsp;
@AdminEmail VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">-- Email that will receive digest emails</span>
&nbsp;
@FromAddress VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">-- From email, they should be able to reply to this with questions</span>
&nbsp;
@MailDomain VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">-- Domain that you can send email to by appending their user name to</span>
<span style="color: #808080; font-style: italic;">-- So if you set this to 'example.com' and your username is EXAMPLE\tlaqua</span>
<span style="color: #808080; font-style: italic;">-- it would attempt to send an email to tlaqua@example.com</span>
&nbsp;
@NTDomain VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">-- NTDomain for usernames.  If your username is EXAMPLE\tlaqua, 'EXAMPLE'</span>
<span style="color: #808080; font-style: italic;">-- is the @NTDomain</span>
&nbsp;
@ReportServerDatabase VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'ReportServer'</span>
<span style="color: #808080; font-style: italic;">-- Name of ReportServer database - MUST be on the server procedure runs on </span>
&nbsp;
@ReportServerSchema VARCHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dbo'</span>
<span style="color: #808080; font-style: italic;">-- Schema for ReportServer tables</span>
&nbsp;
@HoursToCheck INT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>
<span style="color: #808080; font-style: italic;">-- This should conicide with how often you run the procedure</span>
<span style="color: #808080; font-style: italic;">-- If you run the procedure hourly, set this to 1 so it checks 1 hour back</span>
<span style="color: #808080; font-style: italic;">-- If you run the procedure daily, set it to 24</span>
&nbsp;
@HourSchedule INT <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">16777215</span>
<span style="color: #808080; font-style: italic;">-- Bitmask for hours of the day to run.  If you want it to only run if</span>
<span style="color: #808080; font-style: italic;">-- it is 9AM, 6PM, and 11PM, set this value to 8651264:</span>
<span style="color: #808080; font-style: italic;">-- POWER(2, 9) + POWER(2, 18) + POWER(2, 23) = 8651264</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2011/04/monitoring-failed-report-server-subscriptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reporting Services (SSRS/MSRS) 2008 Error: Set used with the complement operator must have all members from the same level</title>
		<link>http://timlaqua.com/2009/10/reporting-services-ssrsmsrs-2008-error-set-used-with-the-complement-operator-must-have-all-members-from-the-same-level/</link>
		<comments>http://timlaqua.com/2009/10/reporting-services-ssrsmsrs-2008-error-set-used-with-the-complement-operator-must-have-all-members-from-the-same-level/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 19:38:06 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[business intelligence]]></category>
		<category><![CDATA[mdx]]></category>
		<category><![CDATA[msrs]]></category>
		<category><![CDATA[reporting services]]></category>
		<category><![CDATA[ssrs]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=244</guid>
		<description><![CDATA[When you use the Not In operator in a SSRS 2008 MDX query filter to exclude a named set, it uses a the complement operator in the constructed MDX. This is fine as long as "all members [are] from the same level." Since you got this error, they are not You can get around this [...]]]></description>
			<content:encoded><![CDATA[<p>When you use the <strong>Not In</strong> operator in a SSRS 2008 MDX query filter to exclude a named set, it uses a the complement operator in the constructed MDX.  This is fine as long as "all members [are] from the same level."  Since you got this error, they are not <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   You can get around this by using the Except() MDX function instead of letting SSRS use the Complement operator</p>
<p>In the ReportServerService log, you'll see something like this:<br />
<em>Microsoft.AnalysisServices.AdomdClient.AdomdErrorResponseException: Query (..., ...) Set used with the complement operator must have all members from the same level.</em></p>
<p><u>Original filter</u><br />
Dimension: <strong>Time</strong><br />
Hierarchy: <strong>Calendar Date</strong><br />
Operator: <strong>Not In</strong><br />
Filter Expression: <strong>[Today]</strong></p>
<p><u>New filter</u><br />
Dimension: <strong>Time</strong><br />
Hierarchy: <strong>Calendar Date</strong><br />
Operator: <strong>MDX</strong><br />
Filter Expression: <strong>Except([Time].[Calendar Date].[Calendar Date].MEMBERS, [Today])</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2009/10/reporting-services-ssrsmsrs-2008-error-set-used-with-the-complement-operator-must-have-all-members-from-the-same-level/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching for keywords in all Reporting Services (SSRS) reports</title>
		<link>http://timlaqua.com/2008/09/searching-for-keywords-in-all-reporting-services-ssrs-reports/</link>
		<comments>http://timlaqua.com/2008/09/searching-for-keywords-in-all-reporting-services-ssrs-reports/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 16:03:24 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[business intelligence]]></category>
		<category><![CDATA[rdl]]></category>
		<category><![CDATA[reporting services]]></category>
		<category><![CDATA[ReportingServices]]></category>
		<category><![CDATA[reports]]></category>
		<category><![CDATA[ssrs]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://timlaqua.com/?p=38</guid>
		<description><![CDATA[During impact analysis for any changes to existing database tables, cube dimensions, cube measures, etc, it's nice to know which reports are going to horribly break before your end-users let you know about it All of the rdl content for reports uploaded to SSRS is stored in the ReportingServices database in the Content column of [...]]]></description>
			<content:encoded><![CDATA[<p>During impact analysis for any changes to existing database tables, cube dimensions, cube measures, etc, it's nice to know which reports are going to horribly break before your end-users let you know about it <img src='http://timlaqua.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   All of the rdl content for reports uploaded to SSRS is stored in the ReportingServices database in the Content column of the Catalog table (in binary, of course) so here's what I came up with to get the list of soon to be broken reports:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">&#91;</span>Path<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">,</span> ContentText
<span style="color: #993333; font-weight: bold;">FROM</span>
<span style="color: #66cc66;">&#40;</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">&#91;</span>Path<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">,</span> cast<span style="color: #66cc66;">&#40;</span>cast<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>content<span style="color: #66cc66;">&#93;</span><span style="color: #993333; font-weight: bold;">AS</span> varbinary<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">8000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">8000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #66cc66;">&#91;</span>ContentText<span style="color: #66cc66;">&#93;</span>
<span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #66cc66;">&#91;</span>catalog<span style="color: #66cc66;">&#93;</span> cat <span style="color: #993333; font-weight: bold;">WITH</span><span style="color: #66cc66;">&#40;</span>nolock<span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #66cc66;">&#91;</span>type<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">2</span>
<span style="color: #66cc66;">&#41;</span> a
<span style="color: #993333; font-weight: bold;">WHERE</span> ContentText <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%ColumnName%'</span> 
	<span style="color: #993333; font-weight: bold;">OR</span> ContentText <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%columnname%'</span> 
	<span style="color: #993333; font-weight: bold;">OR</span> ContentText <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%MeasureName%'</span> 
	<span style="color: #993333; font-weight: bold;">OR</span> ContentText <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%AttributeName%'</span> 
	<span style="color: #993333; font-weight: bold;">OR</span> ContentText <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'%etc...%'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://timlaqua.com/2008/09/searching-for-keywords-in-all-reporting-services-ssrs-reports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

