Skip to content

Instantly share code, notes, and snippets.

@f-bader
Created November 9, 2017 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f-bader/10ff7e127ad114d0265d4ddbb90548fc to your computer and use it in GitHub Desktop.
Save f-bader/10ff7e127ad114d0265d4ddbb90548fc to your computer and use it in GitHub Desktop.
Query TFS Identity Synchronization job history
SELECT
[QueueTime],
[StartTime],
[EndTime],
[Result],
[QueuedReasons] = CASE jobHist.[QueuedReasons]
WHEN 1 THEN N'Scheduled'
WHEN 2 THEN N'Manual'
ELSE 'Unknown'
END,
[Priority]
FROM [Tfs_Configuration]..[tbl_JobHistory] jobHist
WHERE jobHist.Jobid = '544DD581-F72A-45A9-8DE0-8CD3A5F29DFE'
ORDER BY StartTime DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment