Team Foundation Server (TFS) failure attempting to addan attachment when replication is configured on SQL backend version 2008 R2 (RTM) - 10.50.1617.0 (X64) EnterpriseEdition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1).
TF237082: The attachment could not be uploaded. Verify thatyou have a network connection and that Team Foundation Server is available.
HTTP StatusCode: InternalServerError – TFS51334: An unknown Web service error occurred:UPDATETEXT is not allowed because the column is being processed by a concurrentsnapshot or is being replicated to a non-SQL Server Subscriber or Published ina publication allowing Data Transformation Services (DTS) or tracked by ChangeData Capture.
Step 1 ~ Root cause could be size restriction on the publisher. Verify that SQL replicationis configured to handle the maximum text size.
exec sp_configure 'max text repl size', '2147483647'
Step 2 ~ Root cause could be incorrect or lingering old metadatarelated to the publication. In our case there was a column in the TFS databasehaving a value > 0 in its is_non_sql_subscribedcolumn.
select object_id,name,is_dts_replicated, is_column_set, is_merge_published,is_non_sql_subscribed, is_replicated, *
where object_id= object_id('Attachments')
select id,name, colstat
where id =object_id('Attachments')
The quickest way we could reset the column and resolve the problem was to do the following:
1) Drop all replication components (subscriptions, publications, and distribution database)
2) Setup a small dummy database having 1 small table with a primary key
3) Recreate distribution and publish the dummy table
4) Create subscription for dummy publication
5) Create publication on TFS database
6) Create TFS subscription
7) Drop dummy subscription, publication, and database