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: Wednesday, January 29, 2014 5:32 PM
Points: 73, Visits: 94
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 6, 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 3, 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: Monday, December 15, 2014 5:04 PM
Points: 4, Visits: 71
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


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, November 7, 2014 9:05 AM
Points: 54, Visits: 310
Doesn't work on 2008r2, getting Msg 8152, Level 16, State 13, Procedure Upd_RSExecutionLog, Line 108
String or binary data would be truncated.
Post #1023989
Posted Tuesday, January 28, 2014 7:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 6, 2014 10:12 AM
Points: 1, Visits: 14
did you figure out the problem with following message? i am getting this with sql2012

Msg 8152, Level 16, State 13, Procedure Upd_RSExecutionLog, Line 107
String or binary data would be truncated.
The statement has been terminated.
Post #1535427
Posted Tuesday, January 28, 2014 9:22 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, November 7, 2014 9:05 AM
Points: 54, Visits: 310
It's been some time since I looked at this but you may want to test your stored procedure and make the value of the item in question as varchar(max) as the error indicates that the size is too small.
Post #1535532
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse