Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maintenance Plan (2005) Not Deleting Old Files

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
hi everyone,

I use my own stored proc to perform database backups.

But I use a maintenance plan to delete old .bak files, but it is not deleting them.

I'm wondering if it's because that .bak file was not created by the maint plan - that doen't make sense to me but...

I can write my own delete proc but I would rather just use a simple Cleanup Task in a maint plan if I can get it to work.
Anyone had this problem?

Oh, this is SQL Server 2005 SP2

Thanks, John


 
Yes you can use it to delete you own files. It can be used to delete any files as long as they fit the naming standard that you setup. Are you backing up the databases to different folders per database?

Can you post a screenshot of the settings for the procedure?

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Backing up to a common folder for all 3 file types - .bak, .trn and .txt

Just discovered that it IS deleting old bak and trn files, but not the old txt files.

I thought it may be because the report files have embedded spaces in the name like Lawson System Database Backup Local_200801010500.txt but after renaming the file to remove all blanks, it still does not get deleted.

Looks like a bug in the Cleanup Task.

Thanks, John
 
What does it say when you edit the SSIS task and click the View T/SQL button.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top