Partilhar via


Reporting Services Trace Logs

Trace logs contain highly detailed information about report server operations. Trace logs include redundant information that is recorded in other log files, plus additional information that is not otherwise available. Trace logs are useful if you are debugging an application that includes a report server, or investigating a specific problem that was written to the event log or execution log.

Trace logs are created daily, starting with the first entry that occurs after midnight (local time). The trace log file name is derived from the local time of the computer. By default, trace logs are limited to 32 megabytes and deleted after 14 days.

Finding Trace Logs

SQL Server Reporting Services provides four trace log files, which are located at \Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles. They are described in the following table.

Log file name Description

ReportServerService_<timestamp>.log

Trace log for the Report Server Windows service worker threads.

ReportServerService_main_<timestamp>.log

Trace log for the Report Server Windows service management threads.

ReportServerWebApp_<timestamp>.log

Trace log for Report Manager.

ReportServer_<timestamp>.log

Trace log for the Report Server Web service.

Viewing Log Information

Trace logs are text files. You can use any text editor to view a log. The following information can be found in a trace log:

  • System information, including operating system, version, number of processors, and memory.
  • Reporting Services component and version information.
  • Events logged the Application log.
  • Exceptions generated by the report server.
  • Low resource warnings logged by a report server.
  • Inbound SOAP envelopes and summarized outbound SOAP envelopes.
  • HTTP header, stack trace, and debug trace information.

You can review trace logs to determine whether a report delivery occurred, who received the report, and how many delivery attempts were made. Trace logs also record report execution activity and the environment variables that are in effect during report processing. Errors and exceptions are also entered into trace logs. For example, you may find report timeout errors (indicated as a ThreadAbortExceptions entry).

Setting Tracing Levels

Tracing levels are specified through DefaultTraceSwitch and RSTrace settings. Each component stores tracing level settings in different configuration files. To control how much information is recorded to each log file, you must modify the settings in the appropriate configuration file.

Component log file name Configuration file that contains trace settings

ReportServerService_<timestamp>.log and ReportServerService_main_<timestamp>.log

ReportingServicesService.config file.

For more information, see ReportingServicesService Configuration File.

Changes to the configuration file take affect after you restart the Windows service.

ReportServerWebApp_<timestamp>.log

Web.config file for Report Manager, located in the Program Files\SQL Server\MSSQL.n\Reporting Services\ReportManager folder.

Changes to the configuration file take affect immediately.

ReportServer_<timestamp>.log

Web.config file for the Report Server Web service, located in the Program Files\SQL Server\MSSQL.n\Reporting Services\ReportServer folder.

Changes to the configuration file take affect immediately.

RStrace Settings

The following example illustrates the XML structure of the RStrace settings. The value for DefaultTraceSwitch determines the kind of information that is added to the log. Except for the Components attribute, the values for RStrace are the same across the configuration files. The Components attribute has a different set of valid values for the Report Server Web.config file. The table in this section explains the valid values for that attribute.

  <system.diagnostics>
        <switches>
            <add name="DefaultTraceSwitch" value="3" />
        </switches>
  </system.diagnostics>
  <RStrace>
        <add name="FileName" value="ReportServerService_" />
        <add name="FileSizeLimitMb" value="32" />
        <add name="KeepFilesForDays" value="14" />
        <add name="Prefix" value="tid, time" />
        <add name="TraceListeners" value="debugwindow, file" />
        <add name="TraceFileMode" value="unique" />
        <add name="Components" value="all" />
  </RStrace>

The following table provides information about each setting.

Setting Description

RStrace

Specifies namespaces used for errors and tracing.

DefaultTraceSwitch

Specifies the level of information that is reported to the ReportServerService trace log. Each level includes the information reported by all lower-numbered levels. Disabling tracing is not recommended. Valid values are:

0= Disables tracing

1= Exceptions and restarts

2= Exceptions, restarts, warnings

3= Exceptions, restarts, warnings, status messages (default)

4= Verbose mode

FileName

Specifies the first portion of the log file name. The value specified by Prefix completes the rest of the name.

FileSizeLimitMb

Specifies an upper limit on trace log size. The file is measured in megabytes. Valid values are 0 to a maximum integer. The default value is 32. If you specify 0 or a negative number, the report server treats the value as 1.

KeepFilesForDays

Specifies the number of days after which a trace log file will be deleted. Valid values are 0 to a maximum integer. The default value is 14. If you specify 0 or a negative number, the report server treats the value as 1.

Prefix

Specifies a generated value that distinguishes one log instance from another. By default, timestamp values are appended to trace log file names. This value is set to " tid, time ". Do not modify this setting.

TraceListeners

Specifies a target for outputting trace log content. You can specify multiple targets using a comma to separate each one. Valid values are:

DebugWindow (default)

File (default)

StdOut

TraceFileMode

Specifies whether trace logs contain data for a 24-hour period. You should have one unique trace log for each component on each day. This value is set to "Unique (default)". Do not modify this value.

Components

Specifies the components for which trace log information is generated and the trace level. Valid values vary across the configuration files:

In the ReportServerService.exe.config and the Web.config files for Report Manager:

The default value is all. Other valid values for this setting include the names of internal components. Do not modify this value in those configuration files.

In the Web.config file for Report Server:

The default value is "all,RunningJobs:3,SemanticQueryEngine:2,SemanticModelGenerator:2". The valid values for Components in this Web.config file include a comma-delimited list of components and the trace level for each component, where 0=disables tracing, 1=Exceptions and restarts, 2=Exceptions, restarts, warnings, 3=Exceptions, restarts, warnings, status messages (default), 4=Verbose.

  • All is used to trace general report server activity for all processes that are not broken out into the specific categories.
  • RunningJobs is used to trace an in-progress report or subscription operation.
  • SemanticQueryEngine is used to trace a semantic query that is processed when a user performs ad hoc data exploration in a model-based report.
  • SemanticModelGenerator is used to trace model generation.

You can specify all or some of the components (all, RunningJobs, SemanticQueryEngine, SemanticModelGenerator). If you do not want to generate information for a specific component, you can disable tracing for it (for example, "SemanticModelGenerator:0"). Do not disable tracing for all.

If you do not append atrace level to the component, the value specified for DefaultTraceSwitch is used. For example, if you specify "all,RunningJobs,SemanticQueryEngine,SemanticModelGenerator", all components use the default trace level.

You can set "SemanticQueryEngine:4" if you want to view the Transact-SQL statements that are generated for each semantic query. The Transact-SQL statements are recorded in the trace log. The following example illustrates the configuration setting that adds Transact-SQL statements to the log:

<add name="Components" value="all,SemanticQueryEngine:4" />

Adding Custom Configuration Setting to Specify a Dump File Location

You can add a custom setting to set the location that the Dr. Watson for Windows tool uses to store dump files. The custom setting is Directory. The following example provides an illustration of how this configuration setting is specified in the RStrace section:

<add name="Directory" value="U:\logs\" />

For more information, see Knowledge Base Article 913046 on the Microsoft Web site.

See Also

Concepts

Reporting Services Log Files

Other Resources

Reporting Services Errors and Events
Troubleshooting Reporting Services

Help and Information

Getting SQL Server 2005 Assistance