Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Maintenance Plan Problem

Author  Topic 

cdgregory1
Starting Member

1 Post

Posted - 2005-02-09 : 06:54:57
Hello,

I have a maintenance plan set to delete files older than one day to stop my backup drive form filling up before it backs up. For some reason it complete ignores this and does not remove the files before baking up, hence my drive fills up on the second day and the plan fails.

This did work before but for some reason has decided to stop.

Someone please help me

nr
SQLTeam MVY

12543 Posts

Posted - 2005-02-09 : 12:33:00
See
http://www.mindsdoor.net/SQLAdmin/BackupAllDatabases.html

It does all the backups and deletes using t-sql so you know and have control of what's going on.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-02-10 : 09:46:56
A maintenance plan creates the new backup files first, and removes the old backup afterwards. This is how it is designed to work, so that you always havw a backup file on disk. If you delete the file first, you will not have a backup file to restore from if a problem occurs while the backup is running.


quote:
Originally posted by cdgregory1

Hello,

I have a maintenance plan set to delete files older than one day to stop my backup drive form filling up before it backs up. For some reason it complete ignores this and does not remove the files before baking up, hence my drive fills up on the second day and the plan fails.

This did work before but for some reason has decided to stop.

Someone please help me



Codo Ergo Sum
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-02-10 : 14:15:36
>> This is how it is designed to work, so that you always havw a backup file on disk.
Except that that file will be the first ever backup as there's no more room - not a very good design.

It's for things like this tha I advise against using the maint plans.
The backup sp I gave you deletes before the backup - you can always change it to delete after if you wish but that's usually a bad idea.
Note that you don't know if the new backup is any good so deleting after the backup still isn't very good if you are relying on either the new backup or the one being deleted being good.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-02-11 : 04:02:05
Are you running out of space during the backup step, or is the Maintenance Plan failing to get to the Delete Step?

IME if you have Read Only databases, try to do Transaction Backups on databases set to SIMPLE recovery, and so on, then Maintenance Plan will "fail" part way through - i.e. before it gets to the Delete step, which is pretty near the end.

Check the Maintenance Plan error logs to see what is breaking?

Kristen
Go to Top of Page
   

- Advertisement -