|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Monday, January 28, 2013 11:29 AM
Points: 73,
Visits: 93
|
|
|
|
|
|
Forum 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.
|
|
|
|
|
Forum 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?
|
|
|
|
|
Forum 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
|
|
|
|
|
SSC 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
|
|
|
|