19

In SSRS, I noticed that the rdl.data cache files are being stored on my dev machine. Are these files also stored on the Reports Server when reports are run? If so, is there a way to avoid creating those files on the server?

NakedBrunch
  • 48,713
  • 13
  • 73
  • 98
MikeTWebb
  • 9,149
  • 25
  • 93
  • 132
  • microsoft connect request: https://connect.microsoft.com/SQLServer/feedback/details/468482 – Tim Abell Mar 18 '15 at 13:16
  • I've had a problem I thought was due to this but actually was because datasets are copied into `bin/` and then not removed when they're no longer in the project causing the report relying on it to fail to fail during local testing. Horrible. – Tim Abell Mar 23 '15 at 17:25
  • Microsoft Connect is retired, so the link that @TimAbell provided is dead. – Brian Sep 28 '18 at 14:11
  • Microsoft, you're doing the internet wrong. Archived copy: https://web.archive.org/web/20161026070847/https://connect.microsoft.com/SQLServer/feedback/details/468482 – Tim Abell Sep 28 '18 at 15:09

4 Answers4

13

rdl.data files aren't created on the server - they're purely to speed up report execution time during development when you repeatedly run the report with the same parameters whilst tweaking the layout.

As a side point, I believe it's true to say that it's possible to configure the SSRS service to cache results for reuse.

I don't know the details of the caching mechanism that the service uses; it might use a file-based mechanism like rdl.data, or it might store the results in one of the ReportingServices databases.

Perhaps someone more knowledgable about SSRS can confirm the details of the mechanism.

Ed Harper
  • 21,127
  • 4
  • 54
  • 80
  • @Ed....great info. Thanks! And if anyone would care to comment on the server side service caching configuration....I'd be very interested – MikeTWebb Aug 06 '10 at 17:17
  • 1
    I know this is a late comment, but SSRS caching happens inside the ReportServer and ReportServerTempDB database. This might provide a starting point for understanding the SSRS caching model: http://sqlcat.com/technicalnotes/archive/2008/06/26/report-server-catalog-best-practices.aspx – warriorpostman Sep 20 '10 at 20:37
  • @warriorpostman thanks - used the wayback machine to track down the info to this current archive url https://blogs.msdn.microsoft.com/robertbruckner/2008/11/04/technical-note-series-on-reporting-services-performance-and-scalability/ the title is "" as part of "Building and Deploying Large Scale SQL Server Reporting Services Environments Technical Note Series" and here is a concrete sticky link http://web.archive.org/web/20080802051432/http://sqlcat.com:80/technicalnotes/archive/2008/06/05/reporting-services-scale-out-architecture.aspx – John Zabroski Oct 17 '17 at 18:41
10

In development, you can turn the caching off (and eliminate the *.rdl.data files) by editing the designer config file.

For SQL Server 2008 SSRS, the default location would be:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\RSReportDesigner.config

Change CacheDataForPreview to “false”

Source Link http://blog.summitcloud.com/2010/05/disable-reporting-services-data-cache-in-development/

zomf
  • 1,289
  • 1
  • 14
  • 13
  • 4
    This doesn't work this connect issue has been open at MS for 4 years http://social.msdn.microsoft.com/Forums/sqlserver/en-US/0aa81692-352f-4c1f-a0e3-95fe6c0797ca/cachedataforpreview-in-rsreportdesignerconfig-not-honored – Preet Sangha Aug 15 '13 at 02:30
  • setting still exists in VS2013, but still doesn't stop the generation of `.data` files – Tim Abell Mar 18 '15 at 15:11
3

I'm not convinced that zomf's answer works (and neither are Microsoft). It sounds good in theory, but doesn't seem to work in practice.

I think the easiest thing to do is to live with these files. If you're bothered, you could always set the AutoRefresh property of every report that you created to 1 second (although the irritating flashing effect and load on your server might make this option unfeasible).

Otherwise, just click on the REFRESH button when previewing your report.

One other option might be to create dummy parameters for a report, with a randomly generated value each time you run it. Since SSRS only shows cached data when the combination of parameters entered is identical to the previous time you ran the report, this might solve the problem. I haven't tested it in practice, however.

Andy Brown
  • 5,309
  • 4
  • 34
  • 39
0

PowerShell to the rescue, just hide it - add a PowerShell project to your Reports solution and set it as the start-up project in your build configuration:

$path = "../*.rdl.data"

$rdlDataFiles = Get-ChildItem -Recurse -Force -Path "$path";

Write-Output "$path"

$rdlDataFiles | ForEach-Object {
  Write-Output "Hiding *.rdl.data file $_"

  $_.Attributes = $_.Attributes -bor (([System.IO.FileAttributes]::Hidden))

  # Next line isn't required per say, but just a guard.
  $_.Attributes = $_.Attributes -bor (-bnot([System.IO.FileAttributes]::ReadOnly))
}
John Zabroski
  • 2,212
  • 2
  • 28
  • 54