I know that tfsserver has built-in report server. But I want to get a custom report from test case steps. So I need to query some database that belongs to tfsserver. I need the name of this database and if it is possible the structure of it.
Microsoft doesn't support interacting directly with the operational databases. If you want to get data out of TFS the supported ways are either the warehouse database (Tfs_Warehouse) - but I don't believe that includes test steps; the TFS Cube (Tfs_Analysis) - also doesn't include test steps; or the API - which should allow you to retrieve test steps.
So my advice is to retrieve the data from the API. Or alternatively create a custom warehouse adapter that pushes this data over to the warehouse database.
Related
I am using Azure data factory - copy activity to export data to the data lake. I am using Dynamics 365 F&Ô- ODATA and I have data in multiple companies. I would like to get data from all companies for one of the entities and export it to the data lake. When I preview my dataset with a table then I can see data only for one company. I try to add the parameter "cross-company = true" but still it is showing one company data.
How can I solve this problem?
Regards,
Parag Chapre
Preview option in dataset only gives you few rows of data for sampling purpose only. We cannot rely on preview option to see our entier data. Kindly execute your pipeline and validate your results.
I need to extract some data from TFS data base and I can't find the tables that I need.
We using TFS for measure productivity (projects, user stories, tasks, etc) and I must do an productivty indicators with Excel connecting directly to TFS data base indicating the effort time by user and task.
I have the memberships table but no the relations to workitems/task and the effort time
SELECT * FROM [ADObjects] where ObjectCategory = 2 order by DisplayName
Version of TFS 15.117.27024.0
EDIT
Ok, I finded the way to access the data that I wanted with a sql query:
SELECT o.SamAccountName as Usuario
,MAX(Microsoft_VSTS_Common_ClosedDate) AS Fecha
,[WorkItem]
,SUM([Microsoft_VSTS_Scheduling_CompletedWork]) as Horas
,MAX([System_Rev]) AS UltimoMovimiento
,System_Id as WorkItemId
FROM [tfs_warehouse].[dbo].[WorkItemHistoryView] wi
join [Tfs_OurDomain].dbo.ADObjects o on o.DisplayName = wi.System_AssignedTo and o.DomainName = 'DomainName'
where System_State = 'Closed' and System_WorkItemType in ('Bug','Task') and System_AssignedTo is not null
and o.SamAccountName = 'MemberName'
and Microsoft_VSTS_Common_ClosedDate between '20180501' and '20181101'
group by [WorkItem],o.SamAccountName,System_Id
order by o.SamAccountName asc
Querying directly against the TFS_*Collection databases and the TFS_Configuration databases is not supported. The schema can change between even minor updates and breaking changes have occurred in past releases at regular intervals. Running queries against this database may negatively impact the performance of your TFS installation.
To support reporting TFS has shipped with a Reporting capability. The TFS Warehouse (if enabled on your installation) contains most of the data you're looking for in an easy queriable format. These warehouse tables contain a more limited set of data and the schema is kept the same within major releases and hasn't changed much even between different major releases. The process hasn't changed since it's introduction but the functionality is on it's way out when the Azure DevOps Analytics Service is available for on-premise TFS installations. This will expose the data through an ODATA feed.
The analytics service is currently forecasted for TFS 2019:
Analytics - Available for Azure DevOps Server Reporting 2019
If the Warehouse Cube isn't available for your TFS installation, you can use the TFS REST API's to query all the data you're after. The following API's will give you access to the data you need:
Query Work Items Revisions for Reporting.
Query Work Item Links for Reporting
Map work to teams
Query teams & team members
Excel can be extended through .NET and using that functionality to query the REST API you can then use the .NET Extensibility in Excel to populate lists in excel with the data from these REST APIs and drive your reports from those lists.
I'm developing a web extension in on-premises TFS 2017U3.
It uses the ExtensionDataService to store data.
Normally, we're not supposed to manipulate tfs data directly via database script, and I assume that applies to the Extension.tbl* tables as well.
I've searched without success for a tool to help manipulate this data, for purposes such as migrating data across environments, or scripting initial load, etc.
I also found this VSTS SyncMigrator but as far as I can tell it doesn't handle extension data.
Should we just build our own tool to do this?
Based on my knowledge, there is no way/tool to migrate extension data only. You could migrate the whole TFS by checking the following link:
https://learn.microsoft.com/en-us/vsts/tfs-server/admin/move-across-domains
Meanwhile, I have submitted a User Voice at website below, you can vote it:
https://visualstudio.uservoice.com/forums/330519-visual-studio-team-services/suggestions/33538582-provide-api-or-tool-to-migrate-extension-data-in-t
I ended up writing a quick command-line interface using vsts-node-api.
As part of one of the requirements in our project we need to connect to a DB based on input in the UI and then fetch the result accordingly. Now this db can be on different db server or in the same db server it can be a different schema.
We are looking to do it in the most efficient way.
One of the ways we have figured out is having the db connection information (like db server, schema etc) in separate properties files. Based on the input from the UI, we pass the input to a db factory that will read the corresponding properties file and will return the corresponding db connection if it already exists, if it doesn't then it will create a new connection and will return it.
We are using spring; we use weblogic for application deployment.
The most efficient way would be to let the respective functions "know" where to look for the requested data. But that's a lot of work in advance.
If the schemes describe similar data (e.g. address data), think about merging the data or the implementation of an frontend/proxy. Both ways would delegate the "looking for data" to the DB-Server(s) which should be able to handle each request way faster and more efficient than any program-logic.
Thinking in user stories, my requirement would be:
As a development department manager, I want to get the full list of iterations by team project, in order to have a full view of the milestones set for all the teams.
My initial approach is a query to the database. Which could be a good approach to build this query?
Is there another way to get it?
Querying the TfS operational store directly is unsupported and can lead to your system being unsupported. You should use the reporting tools instead.
TFS creates a data warehouse and cube where all the information is stored for reporting purpose's. You can just plug Excel into the data warehouse a query tye data that you need. If you want trend analysis you can also query the cube.
http://msdn.microsoft.com/en-us/library/bb649552.aspx
If you have team explorer installed you can also retrieve work items from queries to the operational store through the API. Any query that you can get in TFS you can load into excel.
http://msdn.microsoft.com/en-us/library/ms181675.aspx