Deploy failures leave db in inconsistent state

ElliotRodriguezElliotRodriguez Posts: 37
edited July 7, 2015 1:09PM in SQL Compare 11
I am trying to synchronize 3 tables, a view, a function, a schema definition, and a role from one source to a target.

During the deployment, I unchecked a dependency that was picked up on the schema definition I was trying to import; it was a domain account that I didn't want living on my local database.

When I tried to run the deployment script, I got an exception regarding the dependent account. That is understandable, but the behavior afterwards is not.

I cancelled the deployment, then went back and selected the domain account to import, along with the other objects I originally wanted to deploy.

The deploy failed again, complaining that the role was already created. Since this is a brand new database target, the only way it could have been created was if the script did not correctly roll back the deployment script when it failed the first time.

Is this by design? Why didnt the transaction get rolled back in its entirety?


  • I have a ticket submitted for this, but it appears that the portion of the script that creates the user is outside the transaction scope defined by Compare when it generates the script.
Sign In or Register to comment.