Quantcast
Channel: SQL Server Manageability forum
Viewing all articles
Browse latest Browse all 1519

Ola Hallengren maintenance solution TSQL script not deleting old backup files from my local SQL server

$
0
0

I have looked on Ola's site (https://ola.hallengren.com/frequently-asked-questions.html) and I did see this:

DatabaseBackup is not deleting old backup files. What could the problem be?

  • Verify that the SQL Server and SQL Server Agent service accounts have full control of the backup directory.
  • If that directory is a network share, verify that the SQL Server and SQL Server Agent service accounts have full control of the network share.
  • If you are using a proxy account, verify that the account is a member of the sysadmin server role and that it has full control of the backup directory and network share.
  • Verify that the file is not locked in the file system; for example, a backup or antivirus software could be locking the file.
  • DatabaseBackup has been designed not to delete transaction log backups that are newer than the most recent full or differential backup. This could explain why transaction log backups are not being deleted.

I followed these instructions and then I right clicked the "sp_delete_backuphistory" job under "SQL Server Agent > Jobs" folder and clicked the "Start job at step ..." option. The job successfully ran, but my .bak backup files were still on located on my separate drive partition I use specifically for these backups. 

The SQL Server and the SQL Server Agent are both using the same AD account. 

Would any of you SQL gurus out there know how to resolve this?

Thank you 





Viewing all articles
Browse latest Browse all 1519

Trending Articles