All backup history is stored in msdb database. Following stored procedure can be execute with parameter, here we clean history before 30 days. USE msdb GO DECLARE @BeforeDays DATETIME SET @BeforeDays = CONVERT ( VARCHAR ( 10 ), DATEADD ( dd , - 30 , GETDATE ()), 101 ) EXEC sp_delete_backuphistory @BeforeDays GO
Get all SQL server queries and interview questions and answers