rlb.usa
rlb.usa

Reputation: 15041

How do I drop SQL Databases? sp_delete_database_backuphistory woes

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

Answers (3)

Syed Waqas
Syed Waqas

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

baazi shaik
baazi shaik

Reputation: 241

enter image description here

Please uncheck the "Delete Backup and restore history information for databases" then click the OK button.

Upvotes: 24

SQLMenace
SQLMenace

Reputation: 135111

do you get the same problem when executing it from a query window like this?

DROP DATABASE DatabaseName

Upvotes: 19

Related Questions