Share via


Error “4 error(s) occurred while executing upd_WorkItemTrackingToDev14M63.sql script.” during upgrade of collection to TFS 2015

We have had a few users who hit the following error when upgrading from their source version to TFS 2015 RTM

Execution of script "WorkItemTrackingToDev14M63.sql" took 0:00:01.337.
[Error] 4 error(s) occurred while executing upd_WorkItemTrackingToDev14M63.sql script.
Failed batch starts on line: 1.
Error: 50000, Level: 16, State: 1, Batch Line: 293, Script Line: 293
Message: %error="600000";%:(null): Unexpected Database Update Failure - Error %error="262";% executing ALTER statement for WorkItemsLatest
Error: 266, Level: 16, State: 2, Batch Line: 0, Script Line: 0
Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 2, current count = 0.
Error: 266, Level: 16, State: 2, Batch Line: 0, Script Line: 0
Message: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.
Error: 3903, Level: 16, State: 1, Batch Line: 123, Script Line: 123
Message: The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.

The collections upgrade was failing on Work Item Tracking. On taking a SQL profiler we found that the error messages listed here, but the execution of these commands weren’t under the service account of TFS, but under a different account – represented by a SID similar to is “S-1-9-3-%”.
This account represents a SQL account under the collection database called “TFSWITDDLADMIN”. This account is put by TFS in the database, for work item related modifications on the database level. This account by default has db_owner privilege on the database.

clip_image002 clip_image004
The reason why the collection upgrade was failing was because, the permission was removed and hence upgrade process could no longer use this account to make table changes on the databases. Giving the db_owner permission fixed the upgrade.

So if you do have collection upgrades failing with similar error, it would be worth a shot to check on this permission.

Content created by – Venkata Narasimhan

Content reviewed by – Romit Gulati
Feel free to let us know if you needed any clarifications/improvements.