• We recently did a deployment that included upgrading a database via DACPAC.
  • We extracted the script from the SSMS Upgrade DAC wizard, removed the objectionable parts (dropping users, extended properties; that sort of thing).
  • We ran the script. The deployment succeeded.

After the deployment, we ran the wizard and extracted another script using the same DACPAC. I expected the only differences to be that it would try to drop the users and extended properties again.

But instead, the script decided to alter/rebuild several schemabound views, and to drop and rebuild the indexes on those views, and of course all the sprocs and functions that depend on at those views.

The schema we were deploying is 100% identical to the one we're upgrading "from", other than the users, extended properties, that sort of thing.

  • The views are materialized, indexed, schemabound.
  • OLTP is not a factor here.
  • SQL Server 2016, compatibility mode 2016.
  • DACPAC built on VS2019 16.6.3, SSDT 16.0.62006.03190
  • The database is not marked as a Data Tier Application in SQL Server, because deploying to those requires more access.

Why does it want to rebuild these views, when they haven't changed?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.