I am performing transaction log file backups via a scheduled stored procedure job utilizing ERASEFILES_ATSTART. The job successfully backs up all logs but fails to erase all of the transaction log backup files as configured. All databases configured with full recovery model. No error seem to be logged. The following is a snippit of the SP that sets the log backup parameters. Please advise.
= '-SQL "BACKUP LOG TO DISK = ''' + @filename
+ ''' WITH NAME = ''Database (' + @databasename
+ ')'', VERIFY, ERASEFILES_ATSTART = 1, MAILTO_ONERROR = ''[email protected]
'', COMPRESSION = 1" -E'