Ssrs 2008 为SSRS报表服务器中的所有报表启用缓存

Ssrs 2008 为SSRS报表服务器中的所有报表启用缓存,ssrs-2008,reporting-services,reportserver,ssrs-2012,Ssrs 2008,Reporting Services,Reportserver,Ssrs 2012,我在SSRS报表服务器中有100多个报表。我需要为所有这些启用缓存。现在,我正在通过报表管理器为每个报表启用缓存 我们可以在任何报表服务器配置文件中添加缓存吗?这样我们就可以在一个地方为所有报表启用缓存 任何帮助都将不胜感激 谢谢 下面是我用来在几分钟内启用报表列表缓存的脚本 将其另存为setreportscaching.rss,然后从命令行运行它: rs.exe -i setreportscaching.rss -e Mgmt2010 -t -s http://mySsrsBox:8080/R

我在SSRS报表服务器中有100多个报表。我需要为所有这些启用缓存。现在,我正在通过报表管理器为每个报表启用缓存

我们可以在任何报表服务器配置文件中添加缓存吗?这样我们就可以在一个地方为所有报表启用缓存

任何帮助都将不胜感激

谢谢
下面是我用来在几分钟内启用报表列表缓存的脚本

将其另存为setreportscaching.rss,然后从命令行运行它:

rs.exe -i setreportscaching.rss -e Mgmt2010 -t -s http://mySsrsBox:8080/ReportServer -v ReportNamesList="OneReport,AnotherReport,YetAnotherOne" -v CacheTimeMinutes="333" -v TargetFolder="ReportsFolderOnServer"
很容易修改它,使其在某个文件夹中的文件中循环,而不是获取csv报告列表。它有一些愚蠢的诊断,可以注释掉的速度

Public Sub Main()

    Dim reportNames As String() = Nothing
    Dim reportName As String
    Dim texp As TimeExpiration
    Dim reportPath As String

    Console.WriteLine("Looping through reports: {0}", ReportNamesList)

    reportNames = ReportNamesList.Split(","c)

    For Each reportName In reportNames

        texp = New TimeExpiration()
        texp.Minutes = CacheTimeMinutes

        reportPath = "/" + TargetFolder + "/" + reportName

        'feel free to comment out this diagnostics to speed things up
        Console.WriteLine("Current caching for " + reportName + DisplayReportCachingSettings(reportPath))

        'this call sets desired caching option
        rs.SetCacheOptions(reportPath, true, texp)

        'feel free to comment out this diagnostics to speed things up
        Console.WriteLine("New caching for " + reportName + DisplayReportCachingSettings(reportPath))

    Next

End Sub

Private Function DisplayReportCachingSettings(reportPath as string)

    Dim isCacheSet As Boolean
    Dim expItem As ExpirationDefinition = New ExpirationDefinition()
    Dim theResult As String

    isCacheSet = rs.GetCacheOptions(reportPath, expItem)

    If isCacheSet = false Or expItem is Nothing Then
        theResult = " is not defined."
    Else
        If expItem.GetType.Name = "TimeExpiration" Then
            theResult = " is " + (CType(expItem, TimeExpiration)).Minutes.ToString() + " minutes."
        ElseIf expItem.GetType.Name = "ScheduleExpiration" Then
            theResult = " is a schedule"
        Else
            theResult = " is " + expItem.GetType.Name
        End If
    End If

    DisplayReportCachingSettings = theResult

End Function

缓存是按报表或共享数据集设置的,所以无法在配置文件中设置。最好的选择可能是使用rs脚本主机或powershell。请参阅类似问题,谢谢!Powershell脚本工作!!