SQL Query for getting SCOM Recovery Tasks Results

Hi All,

Recently in my organisation, i had to provide results that adding SCOM Recovery is efficient as well as working properly.

My first thought was to check Kevin Holman’s SQL query list and couldn’t find anything on it

https://blogs.technet.microsoft.com/kevinholman/2016/11/11/scom-sql-queries/

So next was to find anything for this on the internet, however I end up with nothing.

So after some digging around SCOM OpsDB Tables & views i was able to figure out this SQL query.

If you want to get results of only those Recovery which were created through SCOM 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%’

Hope this helps you out

Happy SCOMing,

Taha Ansari

2 thoughts on “SQL Query for getting SCOM Recovery Tasks Results

  1. Pingback: Monthly System Center Operations Manager Technology Update–May 2017 – Christopher Golden Blog

  2. Pingback: System Center Mayıs 2017 Bülten – Sertaç Topal

Leave a Reply