Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When running a query in Visual Studio, TFS is building an SQL query for it. If you run SQL Server Profiler on the <code>Tfs_DefaultCollection</code> database you should notice a similar query: </p> <pre><code>exec sp_executesql N'set nocount on declare @PersonId as int declare @rebuildOK as int declare @PersonName as nvarchar(255)declare @userSid as nvarchar(256) set @userSid=@P1 exec @rebuildOK=dbo.RebuildCallersViews @PersonId output,@P1 if @rebuildOK&lt;&gt;0 return DECLARE @AsOfUtc DATETIME; SET @AsOfUtc=@P2 DECLARE @Ids TABLE (Id INT NOT NULL) INSERT INTO @Ids SELECT X.ID FROM ( SELECT @P3 AS ID UNION ALL SELECT @P4 AS ID ) as X join dbo.[WorkItemsLatestUsed] RL on X.ID = RL.[System.Id] where RL.[System.AreaID] not in ( select V.BelowID from dbo.[GetInverseUserPermissions](@userSid,1) V ) option (loop join) SELECT I.[System.Id],I.[System.Rev],I.[System.AreaId],I.[System.IterationId],I.[System.WorkItemType],I.[System.AssignedTo] FROM @Ids Ids JOIN [dbo].[WorkItemsAsOf] I with (nolock) ON I.[System.Id] = Ids.[Id] AND I.[System.ChangedDate] &lt;= @AsOfUtc AND @AsOfUtc &lt; I.[System.RevisedDate] OPTION (LOOP JOIN) set nocount off ',N'@P1 nvarchar(4000),@P2 datetime,@P3 int,@P4 int',@P1=N'S-1-5-21-3698201826-3150490006-716737659-1107',@P2='2012-03-24 19:48:09.707',@P3=1266,@P4=1587 </code></pre> <p>Note the use of <code>dbo.RebuildCallersViews</code> stored procedure which in turn serves the <code>@userSid</code> variable and ultimately the temporary <code>I.[System.AssignedTo]</code> column. Stored procedures in TFS database are protected so I couldn't decipher what's going beyond that.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload