Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Stored Procedure to maintain RSExecutionLog Expand / Collapse
Author
Message
Posted Wednesday, May 13, 2009 3:04 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, January 28, 2013 11:29 AM
Points: 73, Visits: 93
Comments posted to this topic are about the item Stored Procedure to maintain RSExecutionLog


Post #716467
Posted Wednesday, June 24, 2009 5:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 06, 2009 4:12 AM
Points: 1, Visits: 13
Thanks for the stored procedure. I seem to have some duplicates in my ExecutionLogs table though. Has anyone else had a problem like this.
Post #740942
Posted Thursday, September 10, 2009 9:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 03, 2011 11:40 AM
Points: 1, Visits: 6
Does this SP apply to SQL Server 2008?
Post #785800
Posted Monday, October 11, 2010 9:40 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 08, 2012 4:39 PM
Points: 4, Visits: 61
I have also seen some duplicates. For me, the reason is because of this segment of code where we are inserting data into the RSExecutionLog table:

INNER JOIN
RSExecutionLog.dbo.Reports R WITH(NOLOCK)
ON C.Name COLLATE Latin1_General_CI_AS = R.Name
AND C.Path COLLATE Latin1_General_CI_AS = R.Path
AND C.Type = R.ReportType

Here, if you have 2 reports with the same name, but they have different cases, the report execution will get added twice. For example, I had a report called "dept activity report.rdl". I then changed it to "Dept Activity Report.rdl". Both report names get added to the reports table, and therefore 1 report execution gets added twice into the RSExecutionLog table. To fix this, I just changed the above code to:

INNER JOIN
RSExecutionLog.dbo.Reports R WITH(NOLOCK)
ON c.ItemID = r.ReportID

It seems like this works fine.

Chris
Post #1002274
Posted Saturday, November 20, 2010 7:53 PM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, May 15, 2013 2:51 PM
Points: 49, Visits: 231
Doesn't work on 2008r2, getting Msg 8152, Level 16, State 13, Procedure Upd_RSExecutionLog, Line 108
String or binary data would be truncated.


JOE FEIGELMAN | Database Developer | Insight | www.Insight.com
t. 480.409.6666 c. 623.428.9421 e. Joe.Feigelman@insight.com
Post #1023989
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse