Home All Groups Group Topic Archive Search About

Database Maintenance - Order of Actions



Author
15 Nov 2006 9:55 PM
KellyLeia
Is there anyway to make the maintenance plan delete the backup files
BEFORE it backs up.  My backups are failing due to lack of disk space,
because it essentially creates two copies of backups before deleting.
I know i can just write a script to delete them before hand, but it
would be alot neater to use the maintenace plan because the maintenance
plan is more dynamic that the script.  Suggestions?

Kelly

Author
15 Nov 2006 10:07 PM
Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA
Yes. If you create a backup plan using the Database Maintenance Wizard, you
can set the amount of time you want to keep the backup files. In SQL 2005 it
translates in a Maintenance Cleanup Task.

Show quoteHide quote
"KellyL***@gmail.com" wrote:

> Is there anyway to make the maintenance plan delete the backup files
> BEFORE it backs up.  My backups are failing due to lack of disk space,
> because it essentially creates two copies of backups before deleting.
> I know i can just write a script to delete them before hand, but it
> would be alot neater to use the maintenace plan because the maintenance
> plan is more dynamic that the script.  Suggestions?
>
> Kelly
>
>
Are all your drivers up to date? click for free checkup

Author
16 Nov 2006 2:08 AM
Greg D. Moore (Strider)
"Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA"
<EdgardoValdezMCTSMCITPMCSDMC***@discussions.microsoft.com> wrote in message
news:33C5A070-12C7-4123-A72F-179C900DEC03@microsoft.com...
> Yes. If you create a backup plan using the Database Maintenance Wizard,
> you
> can set the amount of time you want to keep the backup files. In SQL 2005
> it
> translates in a Maintenance Cleanup Task.
>

Right, 2000 is the same way.  But as KellyLeia points out, that deletion
occurs AFTER the backup completes... if successul.

The problem is, if the backup fails, the deletion never occurs.

In addtion, I'd caution against doing what Kelly wants to do.  Because if
the backup fails for another reason, you've already deleted one of your
backups.

Personally, I'd try to invest in more disk space if possible.


Show quoteHide quote
> "KellyL***@gmail.com" wrote:
>
>> Is there anyway to make the maintenance plan delete the backup files
>> BEFORE it backs up.  My backups are failing due to lack of disk space,
>> because it essentially creates two copies of backups before deleting.
>> I know i can just write a script to delete them before hand, but it
>> would be alot neater to use the maintenace plan because the maintenance
>> plan is more dynamic that the script.  Suggestions?
>>
>> Kelly
>>
>>
Author
16 Nov 2006 2:31 PM
KellyLeia
Conviently, we have tape backups that run at 4am (the db backups run
between 1 and 2 am).  So if the job fails, we've still got yesterday's
backup on tape. If it fails as it did, i don't get in till 8am, so the
damage is done.  Thanks for your help guys.

Greg D. Moore (Strider) wrote:
Show quoteHide quote
> "Edgardo Valdez, MCTS, MCITP, MCSD, MCDBA"
> <EdgardoValdezMCTSMCITPMCSDMC***@discussions.microsoft.com> wrote in message
> news:33C5A070-12C7-4123-A72F-179C900DEC03@microsoft.com...
> > Yes. If you create a backup plan using the Database Maintenance Wizard,
> > you
> > can set the amount of time you want to keep the backup files. In SQL 2005
> > it
> > translates in a Maintenance Cleanup Task.
> >
>
> Right, 2000 is the same way.  But as KellyLeia points out, that deletion
> occurs AFTER the backup completes... if successul.
>
> The problem is, if the backup fails, the deletion never occurs.
>
> In addtion, I'd caution against doing what Kelly wants to do.  Because if
> the backup fails for another reason, you've already deleted one of your
> backups.
>
> Personally, I'd try to invest in more disk space if possible.
>
>
> > "KellyL***@gmail.com" wrote:
> >
> >> Is there anyway to make the maintenance plan delete the backup files
> >> BEFORE it backs up.  My backups are failing due to lack of disk space,
> >> because it essentially creates two copies of backups before deleting.
> >> I know i can just write a script to delete them before hand, but it
> >> would be alot neater to use the maintenace plan because the maintenance
> >> plan is more dynamic that the script.  Suggestions?
> >>
> >> Kelly
> >>
> >>

Bookmark and Share