如何删除 SQL 数据库? sp_delete_database_backuphistory 问题
我想删除服务器上的一些 SQL 数据库,但遇到问题。 我的登录名具有以下角色:
- public
- dbcreator
- serveradmin
当我右键单击数据库并点击删除时,它说
删除备份历史记录失败 服务器“我的服务器” (微软.SqlServer.Smo)
附加 信息:EXECUTE权限 在该对象上被拒绝 'sp_delete_database_backuphistory'
如何删除这些数据库?
I want to delete some SQL Databases on my server, but I'm having problems.
My login has the roles:
- public
- dbcreator
- serveradmin
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请取消选中“删除数据库的备份和恢复历史信息”,然后单击“确定”按钮。
Please uncheck the "Delete Backup and restore history information for databases" then click the OK button.
从这样的查询窗口执行它时,您是否遇到同样的问题?
do you get the same problem when executing it from a query window like this?
唯一对我有用的是:
1)以管理员身份运行 SSMS
2)使用主用户登录(在大多数情况下为 sa)。这是您在安装 Sql Server 时指定的用户。
经过上述步骤后,即使不取消选中备份复选框,我也能够删除数据库!
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!