I'm in process of deploying a DACPAC provided by our ISV. The DACPAC is rebuilding every index in the database. We're testing in a Lab now, however, this will create a significant impact to our maintenance window when we move into production. Is anybody aware how I can skip this index rebuild process in the DACPAC deployment?
Sql-server – DACPAC Deployment Rebuilding All Indexes
sql serverssdt
Related Question
- Sql-server – Ignore login mappings during Dacpac compare
- Sql-server – Defragmenting Indexes Bloats Log Files
- Sql-server – Update statistics more often and stop defragmenting indexes
- Sql-server – Indexes getting highly fragmented during normal usage of system
- Sql-server – SSDT – Exclude certain schema along with unnamed constraint
Best Answer
The most likely reason this is happening is because there are different options / settings on the indexes in the model (the dacpac file) and the target (your actual database). The deployment, by default, will rebuild the index with the new options to get the target to match the model.
There are two deployment options you can enable to avoid this. I would try them one at a time to see which one is causing the rebuild:
There are two more options that ignore index-related things (
IgnoreFillFactor
andIgnoreIndexPadding
). These are enabled by default, but you might want to check and make sure your publish process isn't explicitly setting them toFalse
.