TFS2010: FactTestResult table in Tfs_Warehouse is missing data - tfs

We are running some reports against TFS 2010, in particular on the unit tests that ran against a particular build.
These reports after a certain date started returning no data. My investigation shows that there is no data in FactTestResult table after a certain date, while other tables, for example DimTestRun, have the data associated with the same test runs.
Of these two queries only the first one returns data:
SELECT * FROM FactTestResult WHERE TestRunSK = 58959
SELECT * FROM DimTestRun WHERE TestRunSK = 58959
But for an earlier TestRunSK both queries return data:
SELECT * FROM FactTestResult WHERE TestRunSK = 56582
SELECT * FROM DimTestRun WHERE TestRunSK = 56582
Any ideas on why the data is being lost for the FactTestResult table and if it can be fixed?

Try to go to the Warehouse Control Web Service, and check the Processing Status, then manually process the data warehouse relational database by following article Manually Process the Data Warehouse and Analysis Services Cube for Team Foundation Server.
To access the Warehouse Control Web Service:
Log on to the application-tier server.
Open Internet Explorer, type the following string in the Address bar, and then press ENTER:
-
http://localhost:8080/VirtualDirectory/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx
If manually process Data Warehouse doesn't work, try to rebuild the data warehouse by following article Rebuild the Data Warehouse and Analysis Services Cube.

Related

How can I post updates for deleted records using TEMSDataSetResource in RAD Server 11

I have created a simple new Rad Server Package with resource with a data module to access a Firebird 3.05 database running on Ubuntu 18.0.4. I included sample endpoints and a database endpoint with one table from the database.
I modified the created FDQuery to return a subset of the records.
select * from EXPENSES where COMPANYID = :COMPANYID
It indicated the FireDACFBDriver was not found, and instead of adding the PhysFBDriverLink, I deleted the FireDACFBDriver in the project source and it asked to add back the FireDACIBDriver and it works. This is besides the point, I think, but just full disclosure. I have tried the PhysFBLink with same results, but have had trouble switching back and forth to Linux deploy, so this works for testing I believe.
The client app consists of a TEMSFireDACClient, a FDSchemaAdapter, FD TAble Adapter, FDMemTable and datasource and dbgrid and three buttons.
Button1
Expenses.GetEndpoint.Params.Clear()
expenses.GetEndpoint.Params.AddItem(
'CompanyID','10000080');
Expenses.GetData();
Button2
FDMemTable1.delete;
Button3
Expenses.GetEndpoint.Params.Clear();
expenses.GetEndpoint.Params.AddItem(
'CompanyID','10000080');
Expenses.PostUpdates;
Button One retrieves multiple rows, and button two deletes a row locally, and button 3 tries to apply the table updates back to the server.
When attempting to post updates. I get the following error:
EMS Error: Resource error. Request parameter not found: COMPANYID.
This works when the resource SQL is SELECT * FROM EXPENSES. Is it just that the TEMSDataSetResources can only work on the full table, or Is there something simple I am missing or a reference available for how to accomplish this?
I have tried creating a manual delete endpoint with:
delete from EXPENSES where EXPENSEID = #####
However, that is another post maybe if I have to go there. I cannot get around and error converting Unicode to integer variant when passing the parameter.

Delphi FireDAC: how to refresh data in cache

i need to refresh data in a TFDQuery which is in cached updates.
to simplify my problem, let's suppose my MsACCESS database is composed of 2 tables that i have to join.
LABTEST(id_test, dat_test, id_client, sample_typ)
SAMPLEType(id, SampleName)
in the Delphi application, i am using TFDConnection and 1 TFDQuery (in cached updates) in which i join the 2 tables which script is:
"SELECT T.id_test, T.dat_test, T.id_client, T.sample_typ, S.SampleName
FROM LABTEST T
left JOIN SAMPLEType S ON T.sample_typ = S.id"
in my application, i also use a DBGrid to show the result of the query.
and a button to edit the field "sample_typ", like this:
qr.Edit;
qr.FieldByName('sample_typ').AsString:=ce2.text;
qr.Post;
the edition of the 'sample_typ' field works fine but the corresponding 'sampleName' field is not changing (in the grid) after an update.
in fact it is not refreshed !
the problem is here: if i do refresh of the query, an exception is raised: "cannot refresh dataset. cached updates must be commited or canceled
and batch mode terminated before refreshing"
if i commit the updates, data will be sent to database and i don't want that, i need to keep the data in cache till the end of the operation.
also if i get out of the cache, data will be refreshed in the grid but will be sent to the database after qr.post and i don't want that.
i need to refresh data in the cache. what is the solution ?
Thanks in advance.
The issue comes down to the fact that you haven't told your UI that there is any dependency on the two fields - it clearly can't know how to do the join itself without resubmitting it so if you don't want to send the updates and reload you will have a problem.
It's not clear exactly what you are trying to do, but these two ideas may help you.
If you are not going to edit the fields in the SAMPLEType tables (S) then load the values from that table into a lookup table. You can load this into a TFDMemTable. You can use an adapter which loads from a query. Your UI controls can then show the value based on the valus looked up in your local TFDMemTable. Dependiong on the UI control this might be a 'LookupField' or some such.
You may also be able to store your main data in a TFDMemTable with an Adapter - you can specify diferent TFDCommands to read the whole recordset, refresh a record, update, insert and delete a record. The TFDCommands can act on multiple tables for joined recordsets like this. That would automatically refresh the individual record for you when you post it.

TFS test cases - get most recent run outcome

How to query Test Cases that have been run and to identify if the most recent run passed or failed ?
we are using TFS2015 on premises, also configured SQL reporting server lately.
Since you are using SQL reporting, you could create a SSRS report which will hold the value of all the test case results, execution date, who ran it. There are some related tables in Warehouse DB which stores the information. Each time test case outcome change, will create a test run, you could order by TestRunId: You just need to write a sample query to check the data. For example:
select TestCaseId,TestRunId, ResultOutcome,ResultDate from [dbo].[TestResultView]
where TestCaseId = 'xxx' order by TestRunId,ResultDate
another similar query:
SELECT [ResultSK],[ResultBK],[ResultId],[TestCaseId],[Outcome] FROM [Tfs_Warehouse].[dbo].[DimTestResult]
where TestCaseId ='xxx' order by DateCompleted
You could also user TFS REST API to git a list of test result based on test run ID, detail API please refer this--Get a list of test results.

How Does TFS 2010 Build Logging send data to data warehouse

My questions is how TFS 2010 send its log to the TFS data warehouse?
Does all the contents of the build.log are sent to TFS data warehouse? In what way, is it thru web service?
The contents of the build log is stored (in TFS 2010 anyway) in the Tfs_Collection database's.
Have a look through the following tables:
select * from [tbl_Build] b
join [dbo].[tbl_BuildDefinition] d on b.DefinitionId = d.DefinitionId
join [dbo].[tbl_BuildInformation] bi on bi.BuildId = b.BuildId
join [dbo].[tbl_BuildInformationField] bif on bif.NodeId = bi.NodeId
Given that the data is in the TFS_Collection database's, it is just copied via the TFS's SQL analysis server setup, in the same way the rest of the data is copied into the warehouse.

Dbase oledb provider load data without this deleted records?

I am importing data from dbase into sql and am using the following connection string to read data:
"Provider=Microsoft.Jet.OLEDB.4.0;" + #"Data Source=D:\GS\Source;"
+ "Extended Properties=dbase 5.0;User ID=Admin;Password=;"
The data is read successfully but i find that it includes DELETED rows too. as per dbase, there will be an asterisk as the first character, however we find that neither the file is excluded nor is the asterisk coming as a column.
So how do we load data without this deleted records?
Actually, deleted records are internally marked with a flag and not an "*" that you can query from. However, VFP does have a function to test this deleted flag, but only really applicable if running from a single table and not multiple/joins as it won't know which table you are wondering out... Ex:
select * from YourTable where not deleted()
That being said, VFP has some other "environment" setting commands that MAY work via the OleDB, but I've never actually tried THIS.
Once you have your connection, and it's open, run the following ExecNonQuery might help...
OleDbCommand oCmdTest = new OleDbCommand( "SET DELETED OFF", YourConnection );
OCmdTest.ExecuteNonQuery();
oCmdTest = new OleDbCommand( "Select * from YourTable", YourConnection );
execute it into a data table result set as you are, and you should be good.
One other part. I would not be using the Jet OleDB, but actually using the Microsoft VFP OleDb driver
In dBase after delete command 'pack all' has to be given so that the deleted records are
removed permanently.
If you have access to dBase use the concerned file and then give pack all command

Resources