We're currently working with 5-6 projects simultaneous and we're setting schedule for backup database twice a week and we want to keep only 2-3 backup for each database.
The problem is the database(s) is increase exponential because we also have both dev and production databases, therefore we have to manually delete old backup file(s), this take lots of resource because only a few can access to the database.
Is there any way we can scheduled it for deleting old backup file?
We've research in Microsoft docs and still, nothing was found for this problem.
1条答案
按热度按时间qkf9rpyu1#
The xp_delete_file system stored procedure is dedicated to this job. Despite its name, this procedure only delete backup files generated by SQL Server BACKUP command.
Parameters are :
As an example :