Rediscovering the Obvious

…stumbling in the footsteps of greatness

Policy Override Queries

without comments

Run them directly against the TfsVersionControl database, I don’t see this data in the cube anywhere. Don’t forget in SSMS you can copy from the output grid directly into excel with no problems.

‘ Summary:
select
    id.DisplayName as Account,
    COUNT( id.DisplayName ) [Number of offenses]
from tbl_PolicyOverride po
    JOIN tbl_changeset cs on cs.ChangeSetId = po.ChangeSetId
    JOIN tbl_identity id on cs.CommitterId = id.IdentityId
GROUP BY id.DisplayName
ORDER BY id.DisplayName

‘ Detail:
select
    id.DisplayName as Account,
    cs.ChangeSetId,
    cs.Comment as [Check in Comment],
    po.Comment as [Override Comment]
from tbl_PolicyOverride po
    JOIN tbl_changeset cs on cs.ChangeSetId = po.ChangeSetId
    JOIN tbl_identity id on cs.CommitterId = id.IdentityId
ORDER BY Account, ChangeSetId

 

Written by erwilleke

September 19th, 2007 at 12:41 pm

Posted in Uncategorized

Leave a Reply