Share via


SQL Query for getting SCOM Recovery Tasks Results

Below SQL query will help you fetch the Recovery Results and if you want to get results of only those Recovery which were created through Console you can remove the comment tags from the last line:

SELECT r.[Name],
               r.[DisplayName],
     b.[StateChangeEventId],
       b.[TargetObjectId],
       b.[SubmittedBy],
       b.[Status],
       [Output],
       [ErrorCode],
       [ErrorMessage],
       [TimeScheduled],
       [TimeStarted],
       [TimeFinished],
       b.[LastModified],
       b.[LastModifiedTimestamp]
FROM [OperationsManager].[dbo].[RecoveryJobStatusView] b , [OperationsManager].[dbo].[RecoveryView] r
WHERE b.[RecoveryId] = r.Id
    -- and r.Name like '%MomUIGenaratedRecovery%'