LiteSpeed maintenance plan deletes old backup files using the SQL Server service and SQL Server agent account credentials. In order to delete the old backup via LiteSpeed maintenance plan, SQL Server service and agent account needs to have rights to list the files in the folder and rights to delete the backup file.
Please see video below
To test if the SQL Server service and agent account have enough rights to list the files, start a command prompt using the SQL server service or agent account(if they are different) and issue the following command:
Check that the SQL Server and SQL Server Agent service accounts have full control of the backup directory.
If it's a network share, check that both service accounts have full control of the network share.
If you are using a proxy account, check that the account is a member of the sysadmin server role and that is has full control of the backup directory and network share.
Check that the file is not locked in the file system. It could for example be a backup or anti-virus software that is locking the file.
DatabaseBackup has been designed not to delete transaction log backups that are newer than the latest full or differential backup. This could be the reason for transaction log backups not being deleted.
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center