This is where I'm piling up my notes on MS Reporting Services, SQL Server, Analysis Services and such. It's mostly for me, but use it if it helps.

Tuesday, July 22, 2008

RS Log Files

(MDSN/BOL) Reporting Services Log Files
What info ends up in which log files. Usually you'll want to watch one of three:
  • the Execution Log shows report run info
  • the Windows Application log shows error info
  • the Trace Logs can show loads of detail (if tracing is enabled)

(MSDN) Querying Report Execution Log Data
It's a pretty straight-forward database. If you intend to query it a lot you should probably take the time to copy the data off to a long-term store. You don't want your queries to mess with RS performance, and there can be a lot of writing to these tables.


Here's a sample query to pull back a bunch of results from the Execution Log.


declare @startdate datetime
declare @enddate datetime
declare @pathroot varchar(99)

set @startdate = '2008-04-01'
set @enddate = '2008-08-01'
set @pathroot = '/pub/dir1/'

select c.name, c.path, el.timestart, el.username, el.parameters, el.status, el.[rowcount]
from dbo.ExecutionLog el
join dbo.Catalog c on el.reportid = c.itemid
where el.timestart >= @startdate
and el.timeend <= @enddate and c.path like @pathroot + '%' order by timestart desc

In this example we're looking at ther results for every report in the /pub/dir1 directory and every directory under it. You can set the pathroot to / to retrieve info on every report on the server .

No comments: