How to merge folders and files that are not directly branched from each other?

by XDK 9. December 2013 12:00

Solution:

Solution is to perform a baseless merge using Tf.exe. Following are the steps

1. Perform a Baseless Merge Using Tf.exe

  • Open command prompt
  • cd "<Work space folder>"
  • execute tf merge /recursive /baseless "Parent Folders\Files" "Child Folders\Files"  

          Example:    tf merge /recursive /baseless "$\Project A\Development" "$\Project A\Release\V1.0"

2. Resolve Merge Conflicts

3. Check-In the Merged Changes

You should see the relationship established  between folders\files 

Tags:

TFS 2012 | TFS 2013 | Visual Studio 2010 | Visual Studio 2012

How to queue the original failed job using its job ID instead of going to TFS admin console

by XDK 5. December 2013 09:37

Solution:

Powershell script to invoke failed Jobs

[Reflection.Assembly]::Load("Microsoft.TeamFoundation.Client, Version=10.0.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") $configServer = new-object Microsoft.TeamFoundation.Client.TfsConfigurationServer
(new-object System.Uri("http://<Server>:8080/tfs")) $tfsJobService = $configServer.GetService([Microsoft.TeamFoundation.Framework.Client.
ITeamFoundationJobService]) $jobs= $tfsJobService.QueryJobs() $jobID = new-object System.Guid("the job ID from deletion of project that failed") foreach ($job in $jobs) { if (($job.JobId -eq $jobID)) { $FailedJob = $job $tfsJobService.QueueJobNow($FailedJob,$true) } }

Failed Job Ids can be identified using the below query
use [Tfs_Configuration]  --check this is the name of the configuration database
Select *  FROM [tbl_JobDefinition] where Data like '%failed%' 
--Grab the JobId from above and use in JobHistory
select * from [tbl_JobHistory] where JobId='XXX from above query result”
--check the Result and ResultMessage columns
 

Tags:

TFS 2010 | TFS 2012

Restore TFS SQL Server Enterprise edition databases to SQL Server standard edition.

by XDK 4. December 2013 12:07

Exception:

Database 'Tfs_DefaultCollection' cannot be started because some of the database functionality is not available in the current edition of SQL Server.

 

TFS Collection Databases :-

 

Database 'Tfs_DefaultCollection' cannot be started in this edition of SQL Server because part or all of object <tables> is enabled with data compression or vardecimal storage format. Data compression and vardecimal storage format are only supported on SQL Server Enterprise Edition.

 

Explanation:

 

TFS will enable and use the following Enterprise Edition features.

 

Online index operations

Page compression

Table and index partitioning

Larger read - ahead buffering & Cube perspectives 

 

Data compression and vardecimal storage format will cause problems when moving to different versions of SQL editions. Data compression and vardecimal storage format are enabled on the Tfs_Configuration and Tfs_<Collection> databases by default. Data compression and vardecimal storage format are only supported on SQL Server Enterprise Edition. Hence the databases backed up from Enterprise Editions cannot be restored on other Editions.

 

Solution 1: 

The solution is to remove the objects which have compression on the TFS databases.

 

  • Detach the Collection from TFS through TFS Administration console.
  • Executed the following query on Tfs_<Collection> databases deployed on Enterprise Edition to identify the tables with Data compression and vardecimal storage format enabled.

 

SELECT SCHEMA_NAME(sys.objects.schema_id) AS [SchemaName] ,OBJECT_NAME(sys.objects.object_id) AS [ObjectName] ,[rows] ,[data_compression_desc] ,[index_id] as [IndexID_on_Table] 

FROM sys.partitions INNER JOIN sys.objects ON sys.partitions.object_id = sys.objects.object_id WHERE data_compression > 0 

AND SCHEMA_NAME(sys.objects.schema_id) <> 'SYS' ORDER BY SchemaName, ObjectName;

 

SELECT OBJECTPROPERTY(OBJECT_ID('<table name(s) from above command output>'),'TableHasVarDecimalStorageFormat'

 

Following are the Tfs_<Collection> database tables enabled with Data compression and vardecimal storage format.

 

CodeSense.tbl_AggregateMap

CodeSense.tbl_AggregatorInputQueue

dbo.LinkTreesLatest

dbo.tbl_AuthorizationObject

dbo.tbl_Branch

dbo.tbl_BranchMapping

dbo.tbl_LocalVersion

dbo.tbl_nodes

dbo.tbl_PendingChange

dbo.tbl_PendingChangeRecursive

dbo.tbl_PendingMerge

dbo.tbl_PendingRollback

dbo.tbl_PropertyValue

dbo.tbl_RegistryItems

dbo.tbl_SecurityAccessControlEntry

dbo.tbl_Version

dbo.tbl_WorkingFolder

dbo.tbl_WorkingFolderHistory

dbo.tbl_WorkspaceMapping

 

 

  • Execute the following SQL command to disable the compression on the Tfs_<Collection> database table listed above one by one

 

ALTER INDEX ALL ON '<table name(s) from above command output>' REBUILD WITH (DATA_COMPRESSION = None);

 

ALTER INDEX ALL ON CodeSense.tbl_AggregateMap REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON CodeSense.tbl_AggregatorInputQueue REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.LinkTreesLatest REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_AuthorizationObject REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_Branch REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_BranchMapping REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_LocalVersion REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_nodes REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_PendingChange REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_PendingChangeRecursive REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_PendingMerge REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_PendingRollback REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_PropertyValue REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_RegistryItems REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_SecurityAccessControlEntry REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_Version REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_WorkingFolder REBUILD WITH (DATA_COMPRESSION = None);

ALTER INDEX ALL ON dbo.tbl_WorkingFolderHistory REBUILD WITH (DATA_COMPRESSION = None);

 

ALTER INDEX ALL ON dbo.tbl_WorkspaceMapping REBUILD WITH (DATA_COMPRESSION = None);

 

  • Backup the Tfs_<Collection> database on SQL Server Enterprise Edition and restored it to SQL Server other Editions (both Express and Standard Editions)
  • Attach the Tfs_<Collection> to the TFS instance deployed on SQL Server other Editions (Express and Standard Editions)

Solution 2:

  • Detach the Collection from TFS through TFS Administration console.
  • Executed the following stored procedure on Tfs_<Collection> databases deployed on Enterprise Edition to disable the compression on the relevant tables.

EXEC [dbo].[prc_EnablePrefixCompression] @online = 1, @disable = 1

  • Backup the Tfs_<Collection> database on SQL Server Enterprise Edition and restored it to SQL Server other Editions (both Express and Standard Editions)
  • Attach the Tfs_<Collection> to the TFS instance deployed on SQL Server other Editions (Express and Standard Editions)

Tags: ,

SQL Server | TFS 2010 | TFS 2012

"The required anti-forgery form field "__RequestVerificationToken" is not present. Ensure that cookies are enabled in your browser."

by XDK 4. December 2013 06:43

Exception:

"The required anti-forgery form field "__RequestVerificationToken" is not present. Ensure that cookies are enabled in your browser."

Explanation:

I got the error all of a sudden while adding users to TFS team projects. I did make sure that cookies are enabled on my IE (Ver. 10) but no luck. Finally I found the Download Accelerator Plus (DAP) install caused the issue. Issue could be because of IE 10 and Download Accelerator Plus (DAP) compatibility issues.

Workaround:

1. Uninstall Download Accelerator Plus (DAP).

2. Use alternate browsers like Chrome or Firefox.

Tags:

TFS 2010 | TFS 2012

Missing suite folder in MTM

by XDK 3. December 2013 07:12

Explanation:

One of the QA Lead reported me that the test suite was lost after the migration from TFS 2010 to TFS 2012. Actually the test suite folder was renamed by the QA Lead and reported as deleted :(

How did I resolved it?

  • Queried the TFS 2012 collection database to get the deleted suite id, But I was not able to identify any test suite delete for the reported project in the collection.

           Select * from tbl_auditlog where ObjectType = 11

  • To get the basic information of test suite like ProjectName, TestPlanId, ParentSuiteId, Title, SuiteType, Query, RequirementId, I queried the TFS 2012 collection database as below

           Select p.ProjectName, s.* from tbl_suite s join  tbl_Project p on s.ProjectId = p.ProjectId

  • I was able to identify the suite information which was reported as deleted. With the suite id, I was able to identify who renamed the test suite and when

           Select LastUpdated,LastUpdatedBy FROM tbl_Suite where [SuiteId] = 'XXXX' 

           Select * from tbl_Identity where Id = ' LastUpdatedBy ' 

Tags:

MTM | TFS 2010 | TFS 2012

About the author

My name is Xavier Dilip Kumar Jayaraj having 16+ years of IT experience which includes solid experience and depth Knowledge in Application Life Cycle Management, Configuration Management, Implementation and Support using TFS on-premises and Azure DevOps. I have invested in gaining DevOps knowledege to expertise with Cloud Computing providers namely Microsoft Azure and Amazon Web Services in recent years. I am very positive to learn and adapt emerging technologies to client’s environment.

Microsoft Certified: Azure Administrator Associate

Microsoft Certified: Azure DevOps Engineer Expert

DevOps Engineer Certificate Program | Transcript 

OTP-AWSD5: AWS IoT: Developing and Deploying an Internet of Things

[PCEP-30-01] PCEP – Certified Entry-Level Python Programmer

Quotes I Like

"Failure will never overtake me if my determination to succeed is strong enough."  - Dr. APJ. Abdul Kalam

"Always be yourself, express yourself, have faith in yourself, do not go out and look for a successful personality and duplicate it." - Bruce Lee

"Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important." - Bill Gates

"Innovation distinguishes between a leader and a follower." - Steve Jobs

CategoryList

Disclaimer

The information provided here is based on my expreriences, troubleshooting and online/offline findings. It can be used as is on your own risk without any warranties and I impose no rights.