Reporting services SSRS错误处理
有没有办法定制SSRS报告日志的方式?我想让SSRS向数据库报告订阅错误,有办法吗Reporting services SSRS错误处理,reporting-services,Reporting Services,有没有办法定制SSRS报告日志的方式?我想让SSRS向数据库报告订阅错误,有办法吗 谢谢SSRS已经在运行SSRS实例的服务器上记录了其对报表服务器的订阅状态。您可以在ReportServer上运行以下查询,它将显示订阅的上次运行状态 我将此查询与SSIS包结合使用,以复制报表服务器数据库来创建一个报告,该报告将发送给不同的人,告诉他们报表服务器上存在的订阅的状态 USE ReportServer SELECT CatalogParent.Name ParentName, --Folder
谢谢SSRS已经在运行SSRS实例的服务器上记录了其对报表服务器的订阅状态。您可以在ReportServer上运行以下查询,它将显示订阅的上次运行状态 我将此查询与SSIS包结合使用,以复制报表服务器数据库来创建一个报告,该报告将发送给不同的人,告诉他们报表服务器上存在的订阅的状态
USE ReportServer
SELECT
CatalogParent.Name ParentName, --Folder names
Catalog.Name ReportName, --Actual rpt name
ReportCreatedByUsers.UserName ReportCreatedByUserName, --first deployed by
Catalog.CreationDate ReportCreationDate, --deployed on
ReportModifiedByUsers.UserName ReportModifiedByUserName, --last modification by
Catalog.ModifiedDate ReportModifiedDate,
CountExecution.CountStart TotalExecutions, --total number of executions since deployment
ExecutionLog.InstanceName LastExecutedInstanceName, --server excuted on
ExecutionLog.UserName LastExecutedUserName, --user name
ExecutionLog.Format LastExecutedFormat, --render format
ExecutionLog.TimeStart LastExecutedTimeStart, --start time
ExecutionLog.TimeEnd LastExecutedTimeEnd, --end time
-- These times need work, not always what you expect
ExecutionLog.TimeDataRetrieval LastExecutedTimeDataRetrieval,
ExecutionLog.TimeProcessing LastExecutedTimeProcessing,
ExecutionLog.TimeRendering LastExecutedTimeRendering,
-- end
ExecutionLog.Status LastExecutedStatus, --status of the report processing (not subscription)
ExecutionLog.ByteCount LastExecutedByteCount, -- bytes returned (just because i can)
ExecutionLog.[RowCount] LastExecutedRowCount,
SubscriptionOwner.UserName SubscriptionOwnerUserName, --subscription creator
SubscriptionModifiedByUsers.UserName SubscriptionModifiedByUserName, --subscription modifier
Subscriptions.ModifiedDate SubscriptionModifiedDate, --latest modification date
Subscriptions.Description SubscriptionDescription, --what the subscription does
Subscriptions.LastStatus SubscriptionLastStatus,
Subscriptions.LastRunTime SubscriptionLastRunTime --last time the subscription ran. this may be different to the last
-- execution time especially if report is set to cache
FROM
dbo.Catalog JOIN dbo.Catalog CatalogParent --rs catalog (all things deployed to rs)
ON Catalog.ParentID = CatalogParent.ItemID
JOIN dbo.Users ReportCreatedByUsers --all rs users
ON Catalog.CreatedByID = ReportCreatedByUsers.UserID
JOIN dbo.Users ReportModifiedByUsers
ON Catalog.ModifiedByID = ReportModifiedByUsers.UserID
LEFT JOIN (SELECT
ReportID,
MAX(TimeStart) LastTimeStart
FROM
dbo.ExecutionLog --self explanatory
GROUP BY
ReportID
) LatestExecution --gets the latest execution date rather than having a list longer than life
ON Catalog.ItemID = LatestExecution.ReportID
LEFT JOIN (SELECT
ReportID,
COUNT(TimeStart) CountStart
FROM
dbo.ExecutionLog
GROUP BY
ReportID
) CountExecution -- gets the number of executions (because we can)
ON Catalog.ItemID = CountExecution.ReportID
LEFT JOIN dbo.ExecutionLog
ON LatestExecution.ReportID = ExecutionLog.ReportID
AND LatestExecution.LastTimeStart = ExecutionLog.TimeStart
LEFT JOIN dbo.Subscriptions --subscription details
ON Catalog.ItemID = Subscriptions.Report_OID
LEFT JOIN dbo.Users SubscriptionOwner --user info
ON Subscriptions.OwnerID = SubscriptionOwner.UserID
LEFT JOIN dbo.Users SubscriptionModifiedByUsers --user info
ON Subscriptions.OwnerID = SubscriptionModifiedByUsers.UserID
ORDER BY
CatalogParent.Name,
Catalog.Name
在服务器上的日志文件中记录和报告堆栈跟踪就不那么简单了 SSRS在与SSRS报表一起使用的SQL server实例上具有默认日志记录机制。您可以在以下路径中找到日志文件 C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles 最上面的文件包含所有reporting server日志,打开该文件并导航到末尾以查看最新的日志