Showing posts with label maintenanceplan. Show all posts
Showing posts with label maintenanceplan. Show all posts

Wednesday, March 7, 2012

Backups Not Deleting

We're running SQL Server 2000 service pack 4. I've created a Maintenance
Plan that backs up all user databases, each to its own subfolder, every
night. The plan is supposed to delete old copies as well which it is not
doing. If I change the plan to backup only 1 database it works (old copies
deleted). When I switch it to all user databases, no more deletes. And the
sqlmaint log file does not even show that any deletes were attempted. Note
that we do have some databases offline, so those are skipped, of course, and
the job does fail.
Please help! What's the secret to get the older files to delete?
Here's the Step on the SQL Agent job:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
21EA0A98-9812-4AEA-8BC0-08AEAEAB24EC -Rpt "c:\temp\DB Maintenance
Plan14.txt" -DelTxtRpt 1WEEKS -WriteHistory -VrfyBackup -BkUpMedia
DISK -BkUpDB "D:\Backup" -DelBkUps 1DAYS -CrBkSubDir -BkExt "BAK"'
Thanks,
Krip
>I believe that deletion is done *at the end* of the job, so if anything
>fails, it bails out and no deletion is performed. You can try by first
>including only database so the whole job succeeds.
Tibor,
Thanks for the tip! I detached all our offline databases, and job finishes
without error, and deletes the old backups. Beautiful.
-Krip
|||I have also seen this behavior when the plan includes both Full and Simple
Recovery model databases.
Kevin Hill
IC3 North Texas
www.ChristianCycling.com
Please support me in the 2008 MS150:
http://www.ms150.org/dallas/donate/donate.cfm?id=208000
"Krip" <amk@.kynetix.com> wrote in message
news:7A2C4350-5AED-4F70-A22A-47E64ED68DFD@.microsoft.com...
> Tibor,
> Thanks for the tip! I detached all our offline databases, and job
> finishes without error, and deletes the old backups. Beautiful.
> -Krip
>

BackUps not deleting

I am backing up databases on SQL Server 2000 using a database maintenance
plan. I have set it to remove files older than 1 day (for both the database
and transaction log backups). This used to delete the old backup files, but
now it just backs up, without deleting anything.
Any help would be appreciated,
CraigSorry, I posted this in the wrong place. I have moved it to sqlserver.server
http://msdn.microsoft.com/newsgroup...r&lang=en&cr=US
"Craig HB" wrote:

> I am backing up databases on SQL Server 2000 using a database maintenance
> plan. I have set it to remove files older than 1 day (for both the databas
e
> and transaction log backups). This used to delete the old backup files, bu
t
> now it just backs up, without deleting anything.
> Any help would be appreciated,
> Craig