Delete or Cleanup Backup History in sql server.


All backup history is stored in msdb database.

The following stored procedure can be executed with the 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


 how to enable prevent save changes in SQL Server?

Go into Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation"

Related Posts

What is the Use of isNaN Function in JavaScript? A Comprehensive Explanation for Effective Input Validation

In the world of JavaScript, input validation is a critical aspect of ensuring that user-provided data is processed correctly. One indispensa...