|
I'm looking for a way to run a couple of audit reports;
- Items currently Checked Out
- Check Out History by Item
I've done some searching, and found some info on the Schemas available here. But, my problem is that I am not yet well versed in the Reporting Services side of SQL Server 2005. In Reporting Services, I've set up a Data Source and Model for the TfsVersionControl database. However, I haven't had any success yet with creating one of the two reports mentioned above, and am not even sure if I am going about this the right way. My problems are likely permissions-related, but my main question regarding Reporting Services is, am I supposed to create my own Model against the TfsVersionControl database?
If anyone has already done something similar, and is willing to share, I would appreciate it. Also, if I am going about this the wrong way (from a Reporting Services standpoint), a little direction would also be apprciated.
Thanks,
Chuck
Some additional food for thought...
I've taken the approach of writing SQL directly against the TfsVersionControl database, probably not a good idea. I have put together the following SQL, and am looking for suggestions/answers to some questions.
1. Can anyone tell me if this is a bad idea, i.e. are you aware of potential schema changes, etc. coming down the pike. I would assume that there are, but am looking for alternatives (view, use of Reporting Services, etc.) 2. I haven't yet searched, but if anyone has the "decode" values for LockStatus and LockType, feel free to let me know.
SELECT MAX(V.VersionFrom) VersionFrom ,V.ItemId ,V.FullPath ,I.DisplayName ,L.LockStatus ,L.LockType FROM dbo.tbl_Version V (NOLOCK) INNER JOIN dbo.tbl_Lock L (NOLOCK) ON V.FullPath = L.FullPath INNER JOIN dbo.tbl_Workspace W (NOLOCK) ON L.WorkspaceId = W.WorkspaceId INNER JOIN dbo.tbl_Identity I (NOLOCK) ON W.OwnerId = I.IdentityId GROUP BY V.ItemId ,V.FullPath ,I.DisplayName --,W.Computer --,W.WorkspaceName ,L.LockStatus ,L.LockType |