The correct procedure for configuration
It often happens that the backup maintenance cleanup task is not configured correctly. The result is that the hard disk fills up over time because old backups of the database or the transaction log are not deleted. Below is an explanation for the correct configuration:
- Do NOT enter *.BAK or *.TRN for the file extension, but only BAK or TRN.
- Furthermore, we recommend specifying the concrete path without using the "include top-level subfolders" function, as this does not always work reliably.
- We also recommend adding a = backslash at the end of the folder path. This is illustrated in this example (see picture): EXECUTE master.dbo.xp_delete_file 0,N'C:BackupCIM_RIMIS',N'BAK'. Without this, everything called "CIM_RIMIS" or similar and ending in BAK would be deleted. However, this may not be desired because, for example, there are several subfolders.
Do you have any questions? Then feel free to contact our experts via our contact page or by phone at +49 7331 3076 - 0.