How to change the work item maximum attachment size?

by XDK 14. February 2014 08:16

Explanation:

By default, The maximum WI attachments size is set to 4 MB but the attachment size can be increased up to 2GB

Solution:

  1. Log on to the application-tier server for TFS.

  2. open the URL: http://localhost:8080/tfs/<Collection Name>/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx?op=SetMaxAttachmentSize

  3. Enter the size in bytes, and then choose Invoke. For 9.5 MB, enter  10000000.

    SetMaxAttachmentSize, ConfigurationSettingsService

Solution:

INSERT INTO [<Collection DB Name>].[dbo].[tbl_RegistryItems] VALUES (1,'#\Service\WorkItemTracking\Settings\','MaxAttachmentSize\',10000000);

Tags:

TFS 2010 | TFS 2012 | TFS 2013

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

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

by XDK 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 | Azure DevOps on-premises | SharePoint

Exception calling "QueryActiveRequests" with "2" argument(s): "Value cannot be null.

by XDK 29. August 2013 09:55

Exception:

Exception calling "QueryActiveRequests" with "2" argument(s): "Value cannot be null.
Parameter name: second"
At C:\Builds\Service.ps1:2 char:30
+ $tfsadmin.QueryActiveRequests <<<< ($null, "False") | %{ $_.ActiveRequests } | ft StartTime,UserName,MethodName,RemoteComputer
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

Explanation:

The following powershell script to monitor the TFS active requests work on TFS 2010 but fails with the above exception on TFS 2012.

$tfsadmin = New-WebServiceProxy –UseDefaultCredential -URI http://tfs:8080/tfs/TeamFoundation/administration/v3.0/AdministrationService.asmx?WSDL
$tfsadmin.QueryActiveRequests($null, "False") | %{ $_.ActiveRequests } | ft StartTime,UserName,MethodName,RemoteComputer

While accessing TFS 2012 server, the QueryActiveRequests web method fails to accept null value as an argument.

Workaround:

The workaround is to pass the TFS 2012 HostId as first parameter instead of $null

Following are the step to find the TFS host id

1. Open Microsoft SQL Server Management Studio

2. Connect to TFS 2012 data tier

3. Execute the below query

USE [Tfs_Configuration]
SELECT [HostId], [Name] FROM [Tfs_Configuration].[dbo].[tbl_ServiceHost] where [Name] = 'TEAM FOUNDATION'

Result
-------

HostId                                                       Name
AAAAAAAA-96A2-4BA8-A74C-11422B123456 TEAM FOUNDATION

4. Replace $null with the HostId

$tfsadmin = New-WebServiceProxy –UseDefaultCredential -URI http://tfs:8080/tfs/TeamFoundation/administration/v3.0/AdministrationService.asmx?WSDL
$tfsadmin.QueryActiveRequests("AAAAAAAA-96A2-4BA8-A74C-11422B123456","False") | %{ $_.ActiveRequests } | sort StartTime | ft StartTime,UserName,MethodName,RemoteComputer

 

Tags: ,

Azure DevOps on-premises | TFS 2012

Installing Visual Studio 2012 and then installing Visual Studio 2010 causes unreliable results for Office Integration add-ins

by XDK 1. July 2013 11:10

Explanation

If you install Visual Studio 2012 and then install Visual Studio 2010, and then you open Office to use an Office Integration add-in, Office displays two Team ribbons. Both ribbons are unreliable and may cause worksheets to become corrupted.

Workaround

Disable the Visual Studio 2010 version of the add-in, as follows:

  1. On the menu bar in Office, choose File, Options.
  2. In the Options dialog box, select Add-Ins.
  3. In the Manage box, select COM Add-ins and then choose the Go button.
  4. In the list of add-ins, clear the check box for the Visual Studio 2010 version of the add-in and then choose the OK button. (To determine the version of an add-in, select it and then read its location at the bottom of the Options dialog box. The location for a Visual Studio 2010 add-in is "Microsoft Visual Studio 10.0".)

Tags:

General

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.