EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'Database Name' GO USE [master] GO DROP DATABASE [Database Name] GO
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'Database Name' GO USE [master] GO DROP DATABASE [Database Name] GO