SQL Compare - Disable Check for Source Drift
jkennedy
Posts: 18
When attempting to deploy using SQL Compare (either creating a script or using SQL Compare) I get an error: "SQL Compare - Aborting" and the failure was in Checking for source drift. Here is the actual error:
A duplicate definition was found for the index PK_[tablename]. Ensure that case sensitivity options are set correctly and all object creation scripts are valid. If the problem persists, contact our support.
The aforementioned table and index are exactly the same on the source and destination that I'm working with. Does anyone know:
1) What exactly is Source Drift checking for?
2) How do I fix the issue?
3) How can I ignore this check?
A duplicate definition was found for the index PK_[tablename]. Ensure that case sensitivity options are set correctly and all object creation scripts are valid. If the problem persists, contact our support.
The aforementioned table and index are exactly the same on the source and destination that I'm working with. Does anyone know:
1) What exactly is Source Drift checking for?
2) How do I fix the issue?
3) How can I ignore this check?
Comments
The VCS you use has put the scripts on disk that are one version, and the database says it's a different version.
The "database" version is kept in a database-level extended property.
A few different things could have caused this, like restoring a previous version of the database or reverting some change in the source-controlled version.
You should have the latest version of the database and the latest version of the scripts. You can make sure you have not restored an older version of the database and/or going into "SQL Source Control" and doing a "get latest" operation. I am assuming you are comparing with "source control" as the source.
A duplicate definition was found for the index [index name]. Ensure that case sensitivity options are set correctly and all object creation scripts are valid. If the problem persists, contact our support.
Maybe this is a SQL Source Control issue.
So there is probably a duplicate definition in the source controlled version.
I think you can avoid it by deleting the extended properties from the database.
Otherwise check the files out of source control and see where the duplicate definition is.
The extended properties are called: