Reputation: 15041
I want to delete some SQL Databases on my server, but I'm having problems. My login has the roles:
When I right click the database and hit Delete, it says that
Delete backup history failed for server 'MYSERVER' (Microsoft.SqlServer.Smo)
Additional Information: The EXECUTE permission was denied on the object 'sp_delete_database_backuphistory'
How do I delete these databases?
Upvotes: 20
Views: 21588
Reputation: 2676
The only thing that worked for me was to:
1) Run SSMS as Administrator
2) Login using the master user(which would be sa in most cases). This is the user that you specified when installing Sql Server.
After the above mentioned steps, I was able to delete the database even without unchecking the backup checkbox!
Upvotes: 2
Reputation: 241
Please uncheck the "Delete Backup and restore history information for databases" then click the OK button.
Upvotes: 24
Reputation: 135111
do you get the same problem when executing it from a query window like this?
DROP DATABASE DatabaseName
Upvotes: 19