Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

Maintenance Plan does not delete old BAK and TRN files

$
0
0

My Maintenance Plan doesn't delete old BAK and TRN files, despite my efforts to find and apply all I saw in these posts. In more detail:  (1) The Maintenance Plan creates the BAK files with BAK extension but does not delete them, and (2) the MP creates the TRN files but OMITS the TRN extension and does not delete them.  If I could fix (2), I could write TSQL using  master.dbo.xp_delete_file.

Yes, I create "bak" and "trn" in the wizard, not ".bak" and ".trn".

No, I don't use subfolders.

Yes, I wait, but without success.

Yes, I opend the T-SQL button in the wizard and to my limited knowledge I did confirm the instruction included the trn extension.

Yes, I found a good link in the forum, http://social.technet.microsoft.com/Forums/sqlserver/en-US/53a4afff-79ad-4202-8840-67958a3fd334/sql-server-2008-maintenance-plan-will-not-delete-bak-and-trn-files?forum=sqldisasterrecovery. I used its suggestion to test my permissions, and it worked (deleted all backup but no trn files).

--EXECUTE master.dbo.xp_delete_file 0,N'D:\Program Files\...\MSSQL\Backup',N'bak'

Excluding the use of SSIS, what else is there I can do?


Viewing all articles
Browse latest Browse all 4689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>