How does SQL Compare work out dependency order?
Facing a strange problem when deploying database changes that we cannot figure out. We successfully deployed a number of database changes to production earlier this week. Among the change were two views - call them A and B with B being referenced in A. When we try to deploy the changes to our demonstration database from the production database (same SQL Compare Command Line options) it fails with a message saying invalid reference to View B. Looking at the SQL scripts which have been generated, the demonstration release script is simply in alphabetical order but the production release script takes into account the dependencies between the views. Does anyone know what could have caused this? The only difference we can identify in the two processes is that the account we use for releasing to the production database has the db_owner role on both databases but the account we use for releasing to the demonstration database has db_reader on the production database and db_owner on the demonstration database.
0 · Share on Twitter