2010-01-22 4 views
0

SSRS가 로그를보고하는 방법을 사용자 지정하는 방법이 있습니까? SSRS에서 구독 오류를 데이터베이스에보고하고 싶습니다.이 방법이 있습니까? SSRS 오류 처리

이미 SSRS의 인스턴스가 실행중인 서버에서 보고서 서버에의 가입의 상태를 기록 당신에게

답변

1

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 

서버의 LogFiles 에서처럼 스택 추적에 대한 로깅 및보고가 다소 덜 쉽습니다!

0

SSRS에는 SSRS 보고서와 함께 사용되는 SQL Server 인스턴스의 기본 로깅 메커니즘이 있습니다. 다음 경로에서 로그 파일을 찾을 수 있습니다.

C :

최고 대부분의 파일이 모두보고 서버 로그가 LogFiles 참고 \ \ 프로그램 Files \ Microsoft SQL 서버 \ MSRS11.MSSQLSERVER \ Reporting Services는 해당 파일을 열고 가장 최근의 로그를 볼 끝으로 이동합니다.