Thursday, March 8, 2012

Database Maintenance Plan not removing older files

I've recently upgraded the SQL server from 7 to 2000 SP3. The database
maintenance plans were set to remove backup and log files older than 2 days,
but does not seem to be working any more. I removed the plan and entered a
new one last week and still the files are building and are not being removed.
Any suggestions.
Thanks
Jim Tyou can write an ActiveX script and have it execute before your job
runs to clean up the server prior to maintenance.
Jim T wrote:
> I've recently upgraded the SQL server from 7 to 2000 SP3. The database
> maintenance plans were set to remove backup and log files older than 2 days,
> but does not seem to be working any more. I removed the plan and entered a
> new one last week and still the files are building and are not being removed.
> Any suggestions.
> Thanks
> Jim T|||I was going to write a vb program and schedule it to clean up, but I'm
surprised that it worked fine in 7 but now fails to work under SQL 2000. May
be I should not be surprised at all.
"GlennThomas5" wrote:
> you can write an ActiveX script and have it execute before your job
> runs to clean up the server prior to maintenance.
> Jim T wrote:
> > I've recently upgraded the SQL server from 7 to 2000 SP3. The database
> > maintenance plans were set to remove backup and log files older than 2 days,
> > but does not seem to be working any more. I removed the plan and entered a
> > new one last week and still the files are building and are not being removed.
> >
> > Any suggestions.
> >
> > Thanks
> > Jim T
>|||Jim T wrote:
> I've recently upgraded the SQL server from 7 to 2000 SP3. The database
> maintenance plans were set to remove backup and log files older than 2 days,
> but does not seem to be working any more. I removed the plan and entered a
> new one last week and still the files are building and are not being removed.
> Any suggestions.
> Thanks
> Jim T
Check the maintenance plan history (right-click on the maintenance plan
in Enterprise Manager). Any error messages reported there?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Under the Plan History - No errors were reported - Task says 'Succeeded'
"Tracy McKibben" wrote:
> Jim T wrote:
> > I've recently upgraded the SQL server from 7 to 2000 SP3. The database
> > maintenance plans were set to remove backup and log files older than 2 days,
> > but does not seem to be working any more. I removed the plan and entered a
> > new one last week and still the files are building and are not being removed.
> >
> > Any suggestions.
> >
> > Thanks
> > Jim T
> Check the maintenance plan history (right-click on the maintenance plan
> in Enterprise Manager). Any error messages reported there?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||I also checked the security on the directory which currently has "EVERYONE"
with all rights (Yes, I know it could be a security breach - but had to try
something)
"Tracy McKibben" wrote:
> Jim T wrote:
> > I've recently upgraded the SQL server from 7 to 2000 SP3. The database
> > maintenance plans were set to remove backup and log files older than 2 days,
> > but does not seem to be working any more. I removed the plan and entered a
> > new one last week and still the files are building and are not being removed.
> >
> > Any suggestions.
> >
> > Thanks
> > Jim T
> Check the maintenance plan history (right-click on the maintenance plan
> in Enterprise Manager). Any error messages reported there?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Jim T wrote:
> Under the Plan History - No errors were reported - Task says 'Succeeded'
>
Is that the JOB history, or the PLAN history?
--
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||One of the entries from the Plan history.
I looked at your web site and it reminded me to look into the SQL Server
Agnts jobs and checked the steps on the Database maintenance, even though the
DB Maint util says 2days, the script steps is saying
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
12E9433F-9CC4-4ACC-BF1D-EC7E4566B3EA -Rpt "D:\SQLDATA\LOG\DB Maintenance
Plan14.txt" -DelTxtRpt 4DAYS -WriteHistory -VrfyBackup -BkUpMedia DISK
-BkUpDB "D:\SQLDATA\BACKUP" -DelBkUps 4DAYS -CrBkSubDir -BkExt "BAK"'
I changed the script to 2DAYS and will check processing tonight. Since I
only found the issue 4 days ago and the plan is set for 2 days of files, it
was surprising to see the script with 4 instead of 2. I'll let you know
tommorrow if that worked.
"Tracy McKibben" wrote:
> Jim T wrote:
> > Under the Plan History - No errors were reported - Task says 'Succeeded'
> >
> Is that the JOB history, or the PLAN history?
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Resolved, once the script step was changed to 2DAYS it is now cleaning up
after itself. Strange that the PLAN wizard shows 2 days while the script
shows 4DAYS - but I'll keep that in mind.
Thank you Tracy for a good web site
"Tracy McKibben" wrote:
> Jim T wrote:
> > Under the Plan History - No errors were reported - Task says 'Succeeded'
> >
> Is that the JOB history, or the PLAN history?
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>

No comments:

Post a Comment