Sample - Do you avoid dropping a user's database when you attempt to create a database?
Updated by RebeccaLiu 10 years ago. See history
If you know which machine the database is going to be installed from within your application you should first check that it doesn't already exist and prompt the user accordingly to let them know that they should first manually delete the database. For example the install of the SQL Reporting Services setup handles this problem in an appropriate and simple manner (although some additional help could be provided).
✅ Figure: 
If you cannot be sure of the machine that the database is going to be installed on then you should make use of third party .sql script execution managers such as SSW SQL Deploy to ensure that when you attempt creation of databases where the database already exists then things will run smoothly.
Acknowledgements
Need help?
SSW Consulting has over 30 years of experience developing awesome software solutions.