Installed Ola Hallengren's script and created the following tasks
When I run individual task manually backup and cleanup files are created simultaneously
but when execute task scheduler backup files are not deleted after 48 hrs. The script is as following:
sqlcmd -E -S devwinsql6 -d master -Q "EXECUTE dbo.DatabaseBackup @Databases = 'USER_DATABASES', @Directory = N'D:\Backup\', @BackupType = 'DIFF'"
Do we need the cleanup type parameter in the above script? Cleanup parameter is required in both
dbo.DatabaseBackup as well as task scheduler?
sqlcmd -E -S devwinsql6 -d master -Q "EXECUTE dbo.DatabaseBackup @Databases = 'USER_DATABASES', @CleanupTime = '48', @Directory = N'D:\Backup\', @BackupType = 'DIFF'"