1
將我的TFS 2013 Update 4集合更新到TFS 2015更新3.在DEV位置中使用生產集合數據的備份。生產集合的備份是否分離?沒有任何錯誤。備份是254GB。TFS 2013更新4到TFS 2015更新3集合錯誤
這是錯誤當前附着集合阻止我:
消息3732,級別16,狀態1,第93行 無法刪除類型「typ_ItemSpec2」,因爲它正由對象「prc_QueryPendingChanges_MS」引用。可能有其他對象引用此類型。
SET XACT_ABORT ON
SET NOCOUNT ON
DECLARE @status INT
DECLARE @procedureName SYSNAME = N'upd_VersionControlToDev14M80_PostSchema'
DECLARE @tfError NVARCHAR(255)
IF EXISTS (
SELECT *
FROM sys.triggers
WHERE name = 'trg_tbl_VCFirstRunProject'
)
BEGIN
DROP TRIGGER trg_tbl_VCFirstRunProject
END
IF EXISTS (
SELECT *
FROM sys.indexes
WHERE name = 'IX_tbl_VCFirstRunProject_OldServerItemPrefix'
AND object_id = OBJECT_ID('dbo.tbl_VCFirstRunProject')
)
BEGIN
-- Delete upgrade-only rows for $\, a few partitions at a time
-- We need dynamic SQL for this to be rerunnable.
EXEC @status = sp_executesql N'
DECLARE @batchStart INT = 1
DECLARE @batchEnd INT
DECLARE @end INT
DECLARE @batchSize INT = 50
-- Get the partition range
SELECT TOP (1)
@end = PartitionId
FROM tbl_VCFirstRunProject
ORDER BY PartitionId DESC
WHILE (@batchStart <= @end)
BEGIN
SET @batchEnd = @batchStart + @batchSize
DELETE tbl_VCFirstRunProject
WHERE PartitionId BETWEEN @batchStart AND @batchEnd
AND OldServerItemPrefix = N''''
OPTION (OPTIMIZE FOR (@batchStart=1, @batchEnd=50))
SET @batchStart = @batchEnd + 1
END
'
IF (@status <> 0)
BEGIN
SET @tfError = dbo.func_GetMessage(500004); RAISERROR(@tfError, 16, -1, @procedureName, @status, N'sp_executesql', N'DELETE tbl_VCFirstRunProject')
RETURN
END
DROP INDEX IX_tbl_VCFirstRunProject_OldServerItemPrefix ON tbl_VCFirstRunProject
END
IF EXISTS (
SELECT *
FROM sys.columns
WHERE object_id = Object_ID(N'dbo.tbl_VCFirstRunProject', N'U')
AND name = N'OldServerItemPrefix'
)
BEGIN
ALTER TABLE tbl_VCFirstRunProject
DROP COLUMN OldServerItemPrefix, NewServerItemPrefix
END
IF TYPE_ID('dbo.typ_BranchObject2') IS NOT NULL
BEGIN
DROP TYPE typ_BranchObject2
END
IF TYPE_ID('dbo.typ_BuildMappingInput2') IS NOT NULL
BEGIN
DROP TYPE typ_BuildMappingInput2
END
IF TYPE_ID('dbo.typ_CreateLabelInput') IS NOT NULL
BEGIN
DROP TYPE typ_CreateLabelInput
END
IF TYPE_ID('dbo.typ_ExpandedChange2') IS NOT NULL
BEGIN
DROP TYPE typ_ExpandedChange2
END
IF TYPE_ID('dbo.typ_ItemSpec2') IS NOT NULL
BEGIN
DROP TYPE typ_ItemSpec2
END
IF TYPE_ID('dbo.typ_LocalPendingChange3') IS NOT NULL
BEGIN
DROP TYPE typ_LocalPendingChange3
END
IF TYPE_ID('dbo.typ_LocalVersion3') IS NOT NULL
BEGIN
DROP TYPE typ_LocalVersion3
END
IF TYPE_ID('dbo.typ_LockConflictCandidate2') IS NOT NULL
BEGIN
DROP TYPE typ_LockConflictCandidate2
END
IF TYPE_ID('dbo.typ_LockObject') IS NOT NULL
BEGIN
DROP TYPE typ_LockObject
END
IF TYPE_ID('dbo.typ_Mapping2') IS NOT NULL
BEGIN
DROP TYPE typ_Mapping2
END
IF TYPE_ID('dbo.typ_PendingAdd2') IS NOT NULL
BEGIN
DROP TYPE typ_PendingAdd2
END
IF TYPE_ID('dbo.typ_PendingChangeObject') IS NOT NULL
BEGIN
DROP TYPE typ_PendingChangeObject
END
IF TYPE_ID('dbo.typ_PendingChangeSecurity') IS NOT NULL
BEGIN
DROP TYPE typ_PendingChangeSecurity
END
IF TYPE_ID('dbo.typ_PendingMerge2') IS NOT NULL
BEGIN
DROP TYPE typ_PendingMerge2
END
IF TYPE_ID('dbo.typ_PendingPropertyChange2') IS NOT NULL
BEGIN
DROP TYPE typ_PendingPropertyChange2
END
IF TYPE_ID('dbo.typ_VersionedItemId') IS NOT NULL
BEGIN
DROP TYPE typ_VersionedItemId
END
@jessehouwing謝謝你的解決。希望將您的評論標記爲答案。 – LordRazon