How to determine the version and edition of SQL Server and its components

by Xavier Dilip Kumar 10. December 2013 08:15

Solution:

Connect to the instance of SQL Server, and then run the following query:

  • Select @@version

An example of the output of this query is as follows:

Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)   Mar 29 2009

10:11:52   Copyright (c) 1988-2008 Microsoft Corporation  Express 

Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )

  •  SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

For example, the results resemble the following.

10.0.1600.22 RTM Enterprise Edition

Tags:

SQL Server

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

by Xavier Dilip Kumar 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

TF400012: Full-text search failed. Contact your Team Foundation Server administrator or try the operation again. (Code 30046: SQL Server encountered error 0x8007042d while communicating with full-text filter daem

by Xavier Dilip Kumar 5. December 2013 19:02

Exception:

TF400012: Full-text search failed. Contact your Team Foundation Server administrator or try the operation again. (Code 30046: SQL Server encountered error 0x8007042d while communicating with full-text filter daem

Explanation:

The full search in TFS 2012/2013 team project web application ended up with the above exception.

Solution:

Start "SQL Full-text Filter Daemon Launcher (MSSQLSERVER)" service on the data tier.

Tags:

TFS 2012 | TFS 2013

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

by Xavier Dilip Kumar 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 Xavier Dilip Kumar 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 Xavier Dilip Kumar 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 Xavier Dilip Kumar 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

TFS Service Unavailable – HTTP Error 503. The service is unavailable.

by Xavier Dilip Kumar 20. September 2013 07:32

Explanation:

The TFS 2010 web access url reported "Service Unavailable – HTTP Error 503. The service is unavailable.", but I was able to access TFS 2010 using Visual Studio IDE and other clients. Only the TFS web was not working

Solution:

Verify whether The "Microsoft Team Foundation Server Web Access Application Pool" is running. If not, start the app pool.

 

Tags:

TFS | TFS 2010

Admin SVC must be running in order to create deployment timer job

by Xavier Dilip Kumar 13. September 2013 07:35

Explanation:

You may get the "Admin SVC must be running in order to create deployment timer job" error when you deploy a SP solution or package to the sharepoint server

Solution:

Start the below windows service and deploy again.

Tags:

SharePoint Development

SharePoint Client-Side Object Model ClientContext.Load method cannot be loaded.

by Xavier Dilip Kumar 11. September 2013 11:59

Exception:

'Microsoft.SharePoint.Client.ClientContext' does not contain a definition for 'Load' and no extension method 'Load' accepting a first argument of type 'Microsoft.SharePoint.Client.ClientContext' could be found (are you missing a using directive or an assembly reference)

Explantion:

I got the above exception while using 'Microsoft.SharePoint.Client.ClientContext' load method in my share point web part project. Adding Microsoft.SharePoint.Client.Runtime.dll to project assembly references resolved the errors. The reason for the load method error is as follows

  • ClientContext inherits from ClientRuntimeContext
  • ClientContext is defined in Microsoft.SharePoint.Client.dll
  • ClientRuntimeContext is defined in Microsoft.SharePoint.Client.Runtime.dll
  • ClientRuntimeContext defines the Load method

Soultion:

Add Microsoft.SharePoint.Client.Runtime.dll along with Microsoft.SharePoint.Client.dll to project assembly references.

Tags:

SharePoint Development | TFS | SharePoint

About the author

My name is Xavier Dilip Kumar Jayaraj and I am a Software Configuration Management Engineer with a background in application development, Build & packaging using Install Shield.

Profile in LinkedIn

  

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

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.

Month List