DROP is a best effort

May 5, 2011 at 9:32 PM

The -DROP command will not always work.  I checked in a change today to show more of what is happening during DROP.

First we try to use the DAC.Uninstall method.  This should work in 99% of the cases.  If you deleted the database manually and not the DAC registration this will fail.  This is probably the most common error, and why I added the DROP option in the first place.

The Delete database from the SQL Engine does not know that DAC has dependencies on that database.

If you deleted the DAC registration, but not the database DROP also attempts to remove the DAC registration.

Then a manual DROP DATABASE [name] is issued as well to really try to drop the database.

There are more error messages now, so hopefully it will make more sense.  If you get into a situation where you can't get rid of a database post and I will try to give you some additional things to try.