вторник, 13 февраля 2018 г.

Repair MS SQL after upgrade crash(2008 to 2014)

ERROR: The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.backupset' and the index name 'backupsetMediaSetId'. The duplicate key value is (

1. Run ms sql with trace flag:
   sqlservr.exe -sServerName -T 902
2. Connect to ServerName over sql client and manual change data. Find you error script in update scripts. Typycaly path to update script is "C:\Program Files\Microsoft SQL Server\MSSQL12.EVMVC\MSSQL\Install"