Showing posts with label older. Show all posts
Showing posts with label older. Show all posts

Sunday, March 11, 2012

Database Maintenance Plans - Not removing Files Older than x days

I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
database on the server and have created a database maintenance plan that
backups up all the database nightly. I have also configured the maintenance
plan to delete back files older than 3 days old but this isn't currently
happening.
I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
seen this problem first. Or if anyone can confirm SP4 fixes this issue.
You'll want to apply SP4 anyway, for lots of other reasons. Test the setup of
SP4 on another system to make sure your apps work correctly first, of course.
Have you checked the various logs SQL Server uses? There's a SQL Server Log,
a SQL Server Agent Log, and the Windows Application Event Log. They might
point out what is happening.
That being said, there is an extended stored procedure that Microsoft uses
to delete the files. If the Agent service doesn't have the proper rights to
the subdirectory you might find that to be the issue.
"Gary S" wrote:

> I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
> database on the server and have created a database maintenance plan that
> backups up all the database nightly. I have also configured the maintenance
> plan to delete back files older than 3 days old but this isn't currently
> happening.
> I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
> seen this problem first. Or if anyone can confirm SP4 fixes this issue.
>
|||What is the extended store procedure that's used so that I can check it
hasn't been removed.
"Buck Woody - Microsoft SQL Server Team" wrote:
[vbcol=seagreen]
> You'll want to apply SP4 anyway, for lots of other reasons. Test the setup of
> SP4 on another system to make sure your apps work correctly first, of course.
> Have you checked the various logs SQL Server uses? There's a SQL Server Log,
> a SQL Server Agent Log, and the Windows Application Event Log. They might
> point out what is happening.
> That being said, there is an extended stored procedure that Microsoft uses
> to delete the files. If the Agent service doesn't have the proper rights to
> the subdirectory you might find that to be the issue.
> "Gary S" wrote:
|||It's sp_delete_file - and it's undocumented, meaning unsupported for direct
use by users. Check this thread:
https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=718788&SiteID=17
"Gary S" wrote:
[vbcol=seagreen]
> What is the extended store procedure that's used so that I can check it
> hasn't been removed.
> "Buck Woody - Microsoft SQL Server Team" wrote:
|||Slight correction - that's XP_delete_file. Had an S in there!
"Buck Woody - Microsoft SQL Server Team" wrote:
[vbcol=seagreen]
> It's sp_delete_file - and it's undocumented, meaning unsupported for direct
> use by users. Check this thread:
> https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=718788&SiteID=17
>
> "Gary S" wrote:
|||On Feb 14, 8:35 am, Gary S <G...@.discussions.microsoft.com> wrote:
> I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
> database on the server and have created a database maintenance plan that
> backups up all the database nightly. I have also configured the maintenance
> plan to delete back files older than 3 days old but this isn't currently
> happening.
> I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
> seen this problem first. Or if anyone can confirm SP4 fixes this issue.
There are a couple of common causes for this:
1. The maintenance plan is configured to do transaction log backups,
but one of the databases included is in Simple mode. The plan fails
when it hits this database, and never reaches the "cleanup" step.
2. One of the files to be deleted is "in use" by another process,
such as a tape backup, causing the cleanup process to fail.
Right-click on the maintenance plan itself (not the Agent job), look
at the history, you should be able to get an actual error message from
there.
|||You have to be a sysadmin to run this stored proc, even in SP2 CTP. I have
been told a fix will be raised for a later service pack.
Chris
"Buck Woody - Microsoft SQL Server Team"
<BuckWoodyMicrosoftSQLServerTeam@.discussions.micro soft.com> wrote in message
news:0751636B-0F16-40EA-BAE8-8ADE57217570@.microsoft.com...[vbcol=seagreen]
> It's sp_delete_file - and it's undocumented, meaning unsupported for
> direct
> use by users. Check this thread:
> https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=718788&SiteID=17
>
> "Gary S" wrote:
|||Thanks Tracey a number of the database were set to Simple Recovery. I'm not a
big fan of database mainatenance plans (perfer setting up the jobs
individual) so as I'm not 100% certain why the databases are set to simple
I'll create seperate backup jobs.
"Tracy McKibben" wrote:

> On Feb 14, 8:35 am, Gary S <G...@.discussions.microsoft.com> wrote:
> There are a couple of common causes for this:
> 1. The maintenance plan is configured to do transaction log backups,
> but one of the databases included is in Simple mode. The plan fails
> when it hits this database, and never reaches the "cleanup" step.
> 2. One of the files to be deleted is "in use" by another process,
> such as a tape backup, causing the cleanup process to fail.
> Right-click on the maintenance plan itself (not the Agent job), look
> at the history, you should be able to get an actual error message from
> there.
>
|||On Feb 15, 5:13 am, Gary S <G...@.discussions.microsoft.com> wrote:
> Thanks Tracey a number of the database were set to Simple Recovery. I'm not a
> big fan of database mainatenance plans (perfer setting up the jobs
> individual) so as I'm not 100% certain why the databases are set to simple
> I'll create seperate backup jobs.
>
Here's a script of mine that might help you out:
http://realsqlguy.blogspot.com/2007/02/automating-database-backups.html

Database Maintenance Plans - Not removing Files Older than x days

I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
database on the server and have created a database maintenance plan that
backups up all the database nightly. I have also configured the maintenance
plan to delete back files older than 3 days old but this isn't currently
happening.
I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
seen this problem first. Or if anyone can confirm SP4 fixes this issue.You'll want to apply SP4 anyway, for lots of other reasons. Test the setup of
SP4 on another system to make sure your apps work correctly first, of course.
Have you checked the various logs SQL Server uses? There's a SQL Server Log,
a SQL Server Agent Log, and the Windows Application Event Log. They might
point out what is happening.
That being said, there is an extended stored procedure that Microsoft uses
to delete the files. If the Agent service doesn't have the proper rights to
the subdirectory you might find that to be the issue.
"Gary S" wrote:
> I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
> database on the server and have created a database maintenance plan that
> backups up all the database nightly. I have also configured the maintenance
> plan to delete back files older than 3 days old but this isn't currently
> happening.
> I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
> seen this problem first. Or if anyone can confirm SP4 fixes this issue.
>|||What is the extended store procedure that's used so that I can check it
hasn't been removed.
"Buck Woody - Microsoft SQL Server Team" wrote:
> You'll want to apply SP4 anyway, for lots of other reasons. Test the setup of
> SP4 on another system to make sure your apps work correctly first, of course.
> Have you checked the various logs SQL Server uses? There's a SQL Server Log,
> a SQL Server Agent Log, and the Windows Application Event Log. They might
> point out what is happening.
> That being said, there is an extended stored procedure that Microsoft uses
> to delete the files. If the Agent service doesn't have the proper rights to
> the subdirectory you might find that to be the issue.
> "Gary S" wrote:
> > I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
> > database on the server and have created a database maintenance plan that
> > backups up all the database nightly. I have also configured the maintenance
> > plan to delete back files older than 3 days old but this isn't currently
> > happening.
> >
> > I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
> > seen this problem first. Or if anyone can confirm SP4 fixes this issue.
> >
> >|||It's sp_delete_file - and it's undocumented, meaning unsupported for direct
use by users. Check this thread:
https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=718788&SiteID=17
"Gary S" wrote:
> What is the extended store procedure that's used so that I can check it
> hasn't been removed.
> "Buck Woody - Microsoft SQL Server Team" wrote:
> > You'll want to apply SP4 anyway, for lots of other reasons. Test the setup of
> > SP4 on another system to make sure your apps work correctly first, of course.
> >
> > Have you checked the various logs SQL Server uses? There's a SQL Server Log,
> > a SQL Server Agent Log, and the Windows Application Event Log. They might
> > point out what is happening.
> >
> > That being said, there is an extended stored procedure that Microsoft uses
> > to delete the files. If the Agent service doesn't have the proper rights to
> > the subdirectory you might find that to be the issue.
> >
> > "Gary S" wrote:
> >
> > > I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
> > > database on the server and have created a database maintenance plan that
> > > backups up all the database nightly. I have also configured the maintenance
> > > plan to delete back files older than 3 days old but this isn't currently
> > > happening.
> > >
> > > I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
> > > seen this problem first. Or if anyone can confirm SP4 fixes this issue.
> > >
> > >|||Slight correction - that's XP_delete_file. Had an S in there!
"Buck Woody - Microsoft SQL Server Team" wrote:
> It's sp_delete_file - and it's undocumented, meaning unsupported for direct
> use by users. Check this thread:
> https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=718788&SiteID=17
>
> "Gary S" wrote:
> > What is the extended store procedure that's used so that I can check it
> > hasn't been removed.
> >
> > "Buck Woody - Microsoft SQL Server Team" wrote:
> >
> > > You'll want to apply SP4 anyway, for lots of other reasons. Test the setup of
> > > SP4 on another system to make sure your apps work correctly first, of course.
> > >
> > > Have you checked the various logs SQL Server uses? There's a SQL Server Log,
> > > a SQL Server Agent Log, and the Windows Application Event Log. They might
> > > point out what is happening.
> > >
> > > That being said, there is an extended stored procedure that Microsoft uses
> > > to delete the files. If the Agent service doesn't have the proper rights to
> > > the subdirectory you might find that to be the issue.
> > >
> > > "Gary S" wrote:
> > >
> > > > I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
> > > > database on the server and have created a database maintenance plan that
> > > > backups up all the database nightly. I have also configured the maintenance
> > > > plan to delete back files older than 3 days old but this isn't currently
> > > > happening.
> > > >
> > > > I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
> > > > seen this problem first. Or if anyone can confirm SP4 fixes this issue.
> > > >
> > > >|||On Feb 14, 8:35 am, Gary S <G...@.discussions.microsoft.com> wrote:
> I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
> database on the server and have created a database maintenance plan that
> backups up all the database nightly. I have also configured the maintenance
> plan to delete back files older than 3 days old but this isn't currently
> happening.
> I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
> seen this problem first. Or if anyone can confirm SP4 fixes this issue.
There are a couple of common causes for this:
1. The maintenance plan is configured to do transaction log backups,
but one of the databases included is in Simple mode. The plan fails
when it hits this database, and never reaches the "cleanup" step.
2. One of the files to be deleted is "in use" by another process,
such as a tape backup, causing the cleanup process to fail.
Right-click on the maintenance plan itself (not the Agent job), look
at the history, you should be able to get an actual error message from
there.|||You have to be a sysadmin to run this stored proc, even in SP2 CTP. I have
been told a fix will be raised for a later service pack.
Chris
"Buck Woody - Microsoft SQL Server Team"
<BuckWoodyMicrosoftSQLServerTeam@.discussions.microsoft.com> wrote in message
news:0751636B-0F16-40EA-BAE8-8ADE57217570@.microsoft.com...
> It's sp_delete_file - and it's undocumented, meaning unsupported for
> direct
> use by users. Check this thread:
> https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=718788&SiteID=17
>
> "Gary S" wrote:
>> What is the extended store procedure that's used so that I can check it
>> hasn't been removed.
>> "Buck Woody - Microsoft SQL Server Team" wrote:
>> > You'll want to apply SP4 anyway, for lots of other reasons. Test the
>> > setup of
>> > SP4 on another system to make sure your apps work correctly first, of
>> > course.
>> >
>> > Have you checked the various logs SQL Server uses? There's a SQL Server
>> > Log,
>> > a SQL Server Agent Log, and the Windows Application Event Log. They
>> > might
>> > point out what is happening.
>> >
>> > That being said, there is an extended stored procedure that Microsoft
>> > uses
>> > to delete the files. If the Agent service doesn't have the proper
>> > rights to
>> > the subdirectory you might find that to be the issue.
>> >
>> > "Gary S" wrote:
>> >
>> > > I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a
>> > > number of
>> > > database on the server and have created a database maintenance plan
>> > > that
>> > > backups up all the database nightly. I have also configured the
>> > > maintenance
>> > > plan to delete back files older than 3 days old but this isn't
>> > > currently
>> > > happening.
>> > >
>> > > I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone
>> > > else has
>> > > seen this problem first. Or if anyone can confirm SP4 fixes this
>> > > issue.
>> > >
>> > >|||> It's sp_delete_file - and it's undocumented, meaning unsupported for direct
> use by users.
Buck,
Above is for 2005. For 2000, the files are removed by sqlmaint.exe (which is called by xp_sqlmaint
if the plan is created by the wizard).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Buck Woody - Microsoft SQL Server Team" <BuckWoodyMicrosoftSQLServerTeam@.discussions.microsoft.com>
wrote in message news:0751636B-0F16-40EA-BAE8-8ADE57217570@.microsoft.com...
> It's sp_delete_file - and it's undocumented, meaning unsupported for direct
> use by users. Check this thread:
> https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=718788&SiteID=17
>
> "Gary S" wrote:
>> What is the extended store procedure that's used so that I can check it
>> hasn't been removed.
>> "Buck Woody - Microsoft SQL Server Team" wrote:
>> > You'll want to apply SP4 anyway, for lots of other reasons. Test the setup of
>> > SP4 on another system to make sure your apps work correctly first, of course.
>> >
>> > Have you checked the various logs SQL Server uses? There's a SQL Server Log,
>> > a SQL Server Agent Log, and the Windows Application Event Log. They might
>> > point out what is happening.
>> >
>> > That being said, there is an extended stored procedure that Microsoft uses
>> > to delete the files. If the Agent service doesn't have the proper rights to
>> > the subdirectory you might find that to be the issue.
>> >
>> > "Gary S" wrote:
>> >
>> > > I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
>> > > database on the server and have created a database maintenance plan that
>> > > backups up all the database nightly. I have also configured the maintenance
>> > > plan to delete back files older than 3 days old but this isn't currently
>> > > happening.
>> > >
>> > > I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
>> > > seen this problem first. Or if anyone can confirm SP4 fixes this issue.
>> > >
>> > >|||Thanks Tracey a number of the database were set to Simple Recovery. I'm not a
big fan of database mainatenance plans (perfer setting up the jobs
individual) so as I'm not 100% certain why the databases are set to simple
I'll create seperate backup jobs.
"Tracy McKibben" wrote:
> On Feb 14, 8:35 am, Gary S <G...@.discussions.microsoft.com> wrote:
> > I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number of
> > database on the server and have created a database maintenance plan that
> > backups up all the database nightly. I have also configured the maintenance
> > plan to delete back files older than 3 days old but this isn't currently
> > happening.
> >
> > I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
> > seen this problem first. Or if anyone can confirm SP4 fixes this issue.
> There are a couple of common causes for this:
> 1. The maintenance plan is configured to do transaction log backups,
> but one of the databases included is in Simple mode. The plan fails
> when it hits this database, and never reaches the "cleanup" step.
> 2. One of the files to be deleted is "in use" by another process,
> such as a tape backup, causing the cleanup process to fail.
> Right-click on the maintenance plan itself (not the Agent job), look
> at the history, you should be able to get an actual error message from
> there.
>|||On Feb 15, 5:13 am, Gary S <G...@.discussions.microsoft.com> wrote:
> Thanks Tracey a number of the database were set to Simple Recovery. I'm not a
> big fan of database mainatenance plans (perfer setting up the jobs
> individual) so as I'm not 100% certain why the databases are set to simple
> I'll create seperate backup jobs.
>
Here's a script of mine that might help you out:
http://realsqlguy.blogspot.com/2007/02/automating-database-backups.html

Database Maintenance Plans - Not removing Files Older than x days

I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number o
f
database on the server and have created a database maintenance plan that
backups up all the database nightly. I have also configured the maintenance
plan to delete back files older than 3 days old but this isn't currently
happening.
I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else has
seen this problem first. Or if anyone can confirm SP4 fixes this issue.You'll want to apply SP4 anyway, for lots of other reasons. Test the setup o
f
SP4 on another system to make sure your apps work correctly first, of course
.
Have you checked the various logs SQL Server uses? There's a SQL Server Log,
a SQL Server Agent Log, and the Windows Application Event Log. They might
point out what is happening.
That being said, there is an extended stored procedure that Microsoft uses
to delete the files. If the Agent service doesn't have the proper rights to
the subdirectory you might find that to be the issue.
"Gary S" wrote:

> I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number
of
> database on the server and have created a database maintenance plan that
> backups up all the database nightly. I have also configured the maintenanc
e
> plan to delete back files older than 3 days old but this isn't currently
> happening.
> I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else h
as
> seen this problem first. Or if anyone can confirm SP4 fixes this issue.
>|||On Feb 14, 8:35 am, Gary S <G...@.discussions.microsoft.com> wrote:
> I have a Windows 2000 SP4 Cluster running MS SQL 2000 SP3, I have a number
of
> database on the server and have created a database maintenance plan that
> backups up all the database nightly. I have also configured the maintenanc
e
> plan to delete back files older than 3 days old but this isn't currently
> happening.
> I haven't applied SP4 to SQL 2000 yet as I wanted to know if anyone else h
as
> seen this problem first. Or if anyone can confirm SP4 fixes this issue.
There are a couple of common causes for this:
1. The maintenance plan is configured to do transaction log backups,
but one of the databases included is in Simple mode. The plan fails
when it hits this database, and never reaches the "cleanup" step.
2. One of the files to be deleted is "in use" by another process,
such as a tape backup, causing the cleanup process to fail.
Right-click on the maintenance plan itself (not the Agent job), look
at the history, you should be able to get an actual error message from
there.

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 day
s,
> 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 remov
ed.
> 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:
>|||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 day
s,
> 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 remov
ed.
> 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:
> 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:
> 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 th
e
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:
> 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:
> Is that the JOB history, or the PLAN history?
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>

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
>

Database Maintenance Plan - Can't select Remove Files Older Than .

Hello,
Having a strange problem and hoping that someone else has seen this before.
Have an up and running SQL Server 2000 (no problems that I can detect).
Trying to create a maintenance plan to backup the databases each night.
Start the maintenance plan wizard and get to the "Specify Backup Disk
Directory" screen and the "Remove Files Older Than" drop down box is blank,
can't select "Weeks", "Days", etc.
Have re-installed the Enterprise Manager tools and upgraded to SQL SP4, with
no change.
Thanks in advance for any help or insight.
Hi
Have you tried using the tools on a different machine or against a different
server?
John
"DHood" wrote:

> Hello,
> Having a strange problem and hoping that someone else has seen this before.
> Have an up and running SQL Server 2000 (no problems that I can detect).
> Trying to create a maintenance plan to backup the databases each night.
> Start the maintenance plan wizard and get to the "Specify Backup Disk
> Directory" screen and the "Remove Files Older Than" drop down box is blank,
> can't select "Weeks", "Days", etc.
> Have re-installed the Enterprise Manager tools and upgraded to SQL SP4, with
> no change.
> Thanks in advance for any help or insight.
|||hi dhood,
i have the same problem!
is it possible that this problem exists since you updated to sp4?
because in my case all sql2000sp4 have this problem, sp3 not...
with mangerstudio from sql 2005 this problem is gone, but others appear...
greets
jeff
"DHood" <DHood@.discussions.microsoft.com> schrieb im Newsbeitrag
news:0563B8C1-891B-4AF1-B49C-6EF3E39BA511@.microsoft.com...
> Hello,
> Having a strange problem and hoping that someone else has seen this
> before.
> Have an up and running SQL Server 2000 (no problems that I can detect).
> Trying to create a maintenance plan to backup the databases each night.
> Start the maintenance plan wizard and get to the "Specify Backup Disk
> Directory" screen and the "Remove Files Older Than" drop down box is
> blank,
> can't select "Weeks", "Days", etc.
> Have re-installed the Enterprise Manager tools and upgraded to SQL SP4,
> with
> no change.
> Thanks in advance for any help or insight.

Database Maintenance Plan - Can't select Remove Files Older Than .

Hello,
Having a strange problem and hoping that someone else has seen this before.
Have an up and running SQL Server 2000 (no problems that I can detect).
Trying to create a maintenance plan to backup the databases each night.
Start the maintenance plan wizard and get to the "Specify Backup Disk
Directory" screen and the "Remove Files Older Than" drop down box is blank,
can't select "Weeks", "Days", etc.
Have re-installed the Enterprise Manager tools and upgraded to SQL SP4, with
no change.
Thanks in advance for any help or insight.Hi
Have you tried using the tools on a different machine or against a different
server?
John
"DHood" wrote:
> Hello,
> Having a strange problem and hoping that someone else has seen this before.
> Have an up and running SQL Server 2000 (no problems that I can detect).
> Trying to create a maintenance plan to backup the databases each night.
> Start the maintenance plan wizard and get to the "Specify Backup Disk
> Directory" screen and the "Remove Files Older Than" drop down box is blank,
> can't select "Weeks", "Days", etc.
> Have re-installed the Enterprise Manager tools and upgraded to SQL SP4, with
> no change.
> Thanks in advance for any help or insight.|||hi dhood,
i have the same problem!
is it possible that this problem exists since you updated to sp4?
because in my case all sql2000sp4 have this problem, sp3 not...
with mangerstudio from sql 2005 this problem is gone, but others appear...
greets
jeff
"DHood" <DHood@.discussions.microsoft.com> schrieb im Newsbeitrag
news:0563B8C1-891B-4AF1-B49C-6EF3E39BA511@.microsoft.com...
> Hello,
> Having a strange problem and hoping that someone else has seen this
> before.
> Have an up and running SQL Server 2000 (no problems that I can detect).
> Trying to create a maintenance plan to backup the databases each night.
> Start the maintenance plan wizard and get to the "Specify Backup Disk
> Directory" screen and the "Remove Files Older Than" drop down box is
> blank,
> can't select "Weeks", "Days", etc.
> Have re-installed the Enterprise Manager tools and upgraded to SQL SP4,
> with
> no change.
> Thanks in advance for any help or insight.|||No, I definiately had the problem before I upgraded to SP4. I just tried the
SP4 upgrade in hopes that it would fix the problem.
"j.goines" wrote:
> hi dhood,
> i have the same problem!
> is it possible that this problem exists since you updated to sp4?
> because in my case all sql2000sp4 have this problem, sp3 not...
> with mangerstudio from sql 2005 this problem is gone, but others appear...
> greets
> jeff
> "DHood" <DHood@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:0563B8C1-891B-4AF1-B49C-6EF3E39BA511@.microsoft.com...
> > Hello,
> >
> > Having a strange problem and hoping that someone else has seen this
> > before.
> >
> > Have an up and running SQL Server 2000 (no problems that I can detect).
> > Trying to create a maintenance plan to backup the databases each night.
> > Start the maintenance plan wizard and get to the "Specify Backup Disk
> > Directory" screen and the "Remove Files Older Than" drop down box is
> > blank,
> > can't select "Weeks", "Days", etc.
> >
> > Have re-installed the Enterprise Manager tools and upgraded to SQL SP4,
> > with
> > no change.
> >
> > Thanks in advance for any help or insight.
>
>|||I have tried it against another server, same problem. I have tried accessing
the problem server from the tools on another server and everything looks
normal. So it appears to be something specific on that machine.
"John Bell" wrote:
> Hi
> Have you tried using the tools on a different machine or against a different
> server?
> John
> "DHood" wrote:
> > Hello,
> >
> > Having a strange problem and hoping that someone else has seen this before.
> >
> > Have an up and running SQL Server 2000 (no problems that I can detect).
> > Trying to create a maintenance plan to backup the databases each night.
> > Start the maintenance plan wizard and get to the "Specify Backup Disk
> > Directory" screen and the "Remove Files Older Than" drop down box is blank,
> > can't select "Weeks", "Days", etc.
> >
> > Have re-installed the Enterprise Manager tools and upgraded to SQL SP4, with
> > no change.
> >
> > Thanks in advance for any help or insight.|||Hi
It certainly seems that a dll or somthing is corrupted on that machine. Did
you remove the shared dlls when you un-installed the client tools?
John
"DHood" wrote:
> No, I definiately had the problem before I upgraded to SP4. I just tried the
> SP4 upgrade in hopes that it would fix the problem.
> "j.goines" wrote:
> > hi dhood,
> > i have the same problem!
> > is it possible that this problem exists since you updated to sp4?
> > because in my case all sql2000sp4 have this problem, sp3 not...
> > with mangerstudio from sql 2005 this problem is gone, but others appear...
> >
> > greets
> > jeff
> >
> > "DHood" <DHood@.discussions.microsoft.com> schrieb im Newsbeitrag
> > news:0563B8C1-891B-4AF1-B49C-6EF3E39BA511@.microsoft.com...
> > > Hello,
> > >
> > > Having a strange problem and hoping that someone else has seen this
> > > before.
> > >
> > > Have an up and running SQL Server 2000 (no problems that I can detect).
> > > Trying to create a maintenance plan to backup the databases each night.
> > > Start the maintenance plan wizard and get to the "Specify Backup Disk
> > > Directory" screen and the "Remove Files Older Than" drop down box is
> > > blank,
> > > can't select "Weeks", "Days", etc.
> > >
> > > Have re-installed the Enterprise Manager tools and upgraded to SQL SP4,
> > > with
> > > no change.
> > >
> > > Thanks in advance for any help or insight.
> >
> >
> >|||No, I didn't remove any files manually. Do you know what and where they are?
"John Bell" wrote:
> Hi
> It certainly seems that a dll or somthing is corrupted on that machine. Did
> you remove the shared dlls when you un-installed the client tools?
> John
> "DHood" wrote:
> > No, I definiately had the problem before I upgraded to SP4. I just tried the
> > SP4 upgrade in hopes that it would fix the problem.
> >
> > "j.goines" wrote:
> >
> > > hi dhood,
> > > i have the same problem!
> > > is it possible that this problem exists since you updated to sp4?
> > > because in my case all sql2000sp4 have this problem, sp3 not...
> > > with mangerstudio from sql 2005 this problem is gone, but others appear...
> > >
> > > greets
> > > jeff
> > >
> > > "DHood" <DHood@.discussions.microsoft.com> schrieb im Newsbeitrag
> > > news:0563B8C1-891B-4AF1-B49C-6EF3E39BA511@.microsoft.com...
> > > > Hello,
> > > >
> > > > Having a strange problem and hoping that someone else has seen this
> > > > before.
> > > >
> > > > Have an up and running SQL Server 2000 (no problems that I can detect).
> > > > Trying to create a maintenance plan to backup the databases each night.
> > > > Start the maintenance plan wizard and get to the "Specify Backup Disk
> > > > Directory" screen and the "Remove Files Older Than" drop down box is
> > > > blank,
> > > > can't select "Weeks", "Days", etc.
> > > >
> > > > Have re-installed the Enterprise Manager tools and upgraded to SQL SP4,
> > > > with
> > > > no change.
> > > >
> > > > Thanks in advance for any help or insight.
> > >
> > >
> > >|||Hi
When you un-install it usually prompts to remove shared files. You may want
to see what dlls are loaded when you start the application.
John
"DHood" wrote:
> No, I didn't remove any files manually. Do you know what and where they are?
> "John Bell" wrote:
> > Hi
> >
> > It certainly seems that a dll or somthing is corrupted on that machine. Did
> > you remove the shared dlls when you un-installed the client tools?
> >
> > John
> >
> > "DHood" wrote:
> >
> > > No, I definiately had the problem before I upgraded to SP4. I just tried the
> > > SP4 upgrade in hopes that it would fix the problem.
> > >
> > > "j.goines" wrote:
> > >
> > > > hi dhood,
> > > > i have the same problem!
> > > > is it possible that this problem exists since you updated to sp4?
> > > > because in my case all sql2000sp4 have this problem, sp3 not...
> > > > with mangerstudio from sql 2005 this problem is gone, but others appear...
> > > >
> > > > greets
> > > > jeff
> > > >
> > > > "DHood" <DHood@.discussions.microsoft.com> schrieb im Newsbeitrag
> > > > news:0563B8C1-891B-4AF1-B49C-6EF3E39BA511@.microsoft.com...
> > > > > Hello,
> > > > >
> > > > > Having a strange problem and hoping that someone else has seen this
> > > > > before.
> > > > >
> > > > > Have an up and running SQL Server 2000 (no problems that I can detect).
> > > > > Trying to create a maintenance plan to backup the databases each night.
> > > > > Start the maintenance plan wizard and get to the "Specify Backup Disk
> > > > > Directory" screen and the "Remove Files Older Than" drop down box is
> > > > > blank,
> > > > > can't select "Weeks", "Days", etc.
> > > > >
> > > > > Have re-installed the Enterprise Manager tools and upgraded to SQL SP4,
> > > > > with
> > > > > no change.
> > > > >
> > > > > Thanks in advance for any help or insight.
> > > >
> > > >
> > > >|||See if this helps--
If you profile when on that form you should see the following:
xp_instance_regread N'HKEY_LOCAL_MACHINE',
N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'BackupDirectory'
I was getting the same problem that you were, and discovered that this proc
was returning an error b/c the registry key did not exist. I entered key and
a valid value and the problem went away.
I know several people have posted on this same issue, so I hope someone gets
some value out of this.
JIM BOUTIT
MCSE MCDBA
"John Bell" wrote:
> Hi
> When you un-install it usually prompts to remove shared files. You may want
> to see what dlls are loaded when you start the application.
> John
>
> "DHood" wrote:
> > No, I didn't remove any files manually. Do you know what and where they are?
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > It certainly seems that a dll or somthing is corrupted on that machine. Did
> > > you remove the shared dlls when you un-installed the client tools?
> > >
> > > John
> > >
> > > "DHood" wrote:
> > >
> > > > No, I definiately had the problem before I upgraded to SP4. I just tried the
> > > > SP4 upgrade in hopes that it would fix the problem.
> > > >
> > > > "j.goines" wrote:
> > > >
> > > > > hi dhood,
> > > > > i have the same problem!
> > > > > is it possible that this problem exists since you updated to sp4?
> > > > > because in my case all sql2000sp4 have this problem, sp3 not...
> > > > > with mangerstudio from sql 2005 this problem is gone, but others appear...
> > > > >
> > > > > greets
> > > > > jeff
> > > > >
> > > > > "DHood" <DHood@.discussions.microsoft.com> schrieb im Newsbeitrag
> > > > > news:0563B8C1-891B-4AF1-B49C-6EF3E39BA511@.microsoft.com...
> > > > > > Hello,
> > > > > >
> > > > > > Having a strange problem and hoping that someone else has seen this
> > > > > > before.
> > > > > >
> > > > > > Have an up and running SQL Server 2000 (no problems that I can detect).
> > > > > > Trying to create a maintenance plan to backup the databases each night.
> > > > > > Start the maintenance plan wizard and get to the "Specify Backup Disk
> > > > > > Directory" screen and the "Remove Files Older Than" drop down box is
> > > > > > blank,
> > > > > > can't select "Weeks", "Days", etc.
> > > > > >
> > > > > > Have re-installed the Enterprise Manager tools and upgraded to SQL SP4,
> > > > > > with
> > > > > > no change.
> > > > > >
> > > > > > Thanks in advance for any help or insight.
> > > > >
> > > > >
> > > > >

Database Maintenance Plan - Can't select Remove Files Older Than .

Hello,
Having a strange problem and hoping that someone else has seen this before.
Have an up and running SQL Server 2000 (no problems that I can detect).
Trying to create a maintenance plan to backup the databases each night.
Start the maintenance plan wizard and get to the "Specify Backup Disk
Directory" screen and the "Remove Files Older Than" drop down box is blank,
can't select "Weeks", "Days", etc.
Have re-installed the Enterprise Manager tools and upgraded to SQL SP4, with
no change.
Thanks in advance for any help or insight.Hi
Have you tried using the tools on a different machine or against a different
server?
John
"DHood" wrote:

> Hello,
> Having a strange problem and hoping that someone else has seen this before
.
> Have an up and running SQL Server 2000 (no problems that I can detect).
> Trying to create a maintenance plan to backup the databases each night.
> Start the maintenance plan wizard and get to the "Specify Backup Disk
> Directory" screen and the "Remove Files Older Than" drop down box is blank
,
> can't select "Weeks", "Days", etc.
> Have re-installed the Enterprise Manager tools and upgraded to SQL SP4, wi
th
> no change.
> Thanks in advance for any help or insight.|||hi dhood,
i have the same problem!
is it possible that this problem exists since you updated to sp4?
because in my case all sql2000sp4 have this problem, sp3 not...
with mangerstudio from sql 2005 this problem is gone, but others appear...
greets
jeff
"DHood" <DHood@.discussions.microsoft.com> schrieb im Newsbeitrag
news:0563B8C1-891B-4AF1-B49C-6EF3E39BA511@.microsoft.com...
> Hello,
> Having a strange problem and hoping that someone else has seen this
> before.
> Have an up and running SQL Server 2000 (no problems that I can detect).
> Trying to create a maintenance plan to backup the databases each night.
> Start the maintenance plan wizard and get to the "Specify Backup Disk
> Directory" screen and the "Remove Files Older Than" drop down box is
> blank,
> can't select "Weeks", "Days", etc.
> Have re-installed the Enterprise Manager tools and upgraded to SQL SP4,
> with
> no change.
> Thanks in advance for any help or insight.

Wednesday, March 7, 2012

Database Maintenance - no backups being removed

Database maintenance plan doesn't allow me to choose to
delete files older than x number of days/weeks. I can
choose the option, input a number, but the drop down for
days/weeks contains no items.
I Jon,
a friend tell me to add in the registry the string value BackupDirectory
with default C: at the address
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\"Instance_Na me"\MSSQLServer...
and this work!!!
Mirco Scott
mailto: mscotta@.giada.it
Giada s.r.l.
<jon.epstein@.infov{REMOVE}.com> ha scritto nel messaggio
news:2cde01c42886$1f8f4bf0$a401280a@.phx.gbl...
> Database maintenance plan doesn't allow me to choose to
> delete files older than x number of days/weeks. I can
> choose the option, input a number, but the drop down for
> days/weeks contains no items.

Database Maintanence not deleting old backups

I have a database maintanence plan set up to backup all my SQL 2000
databases and to delete the backups older than 3 days. It doesn't delete the
old ones. Is this a bug or am I just missing something?You may be missing something.
Check the extention that you defined to delete. Check the folder that you
chose to delete the backup files.
Also, check the maintanence plan history for more info.
--
Ekrem Önsoy
"Tom Reis" <reistom@.cdnet.cod.edu> wrote in message
news:uO3WSRoNIHA.5360@.TK2MSFTNGP03.phx.gbl...
>I have a database maintanence plan set up to backup all my SQL 2000
>databases and to delete the backups older than 3 days. It doesn't delete
>the old ones. Is this a bug or am I just missing something?
>

Database Maintanence not deleting old backups

I have a database maintanence plan set up to backup all my SQL 2000
databases and to delete the backups older than 3 days. It doesn't delete the
old ones. Is this a bug or am I just missing something?
You may be missing something.
Check the extention that you defined to delete. Check the folder that you
chose to delete the backup files.
Also, check the maintanence plan history for more info.
Ekrem nsoy
"Tom Reis" <reistom@.cdnet.cod.edu> wrote in message
news:uO3WSRoNIHA.5360@.TK2MSFTNGP03.phx.gbl...
>I have a database maintanence plan set up to backup all my SQL 2000
>databases and to delete the backups older than 3 days. It doesn't delete
>the old ones. Is this a bug or am I just missing something?
>

Database Maintanence not deleting old backups

I have a database maintanence plan set up to backup all my SQL 2000
databases and to delete the backups older than 3 days. It doesn't delete the
old ones. Is this a bug or am I just missing something?You may be missing something.
Check the extention that you defined to delete. Check the folder that you
chose to delete the backup files.
Also, check the maintanence plan history for more info.
Ekrem nsoy
"Tom Reis" <reistom@.cdnet.cod.edu> wrote in message
news:uO3WSRoNIHA.5360@.TK2MSFTNGP03.phx.gbl...
>I have a database maintanence plan set up to backup all my SQL 2000
>databases and to delete the backups older than 3 days. It doesn't delete
>the old ones. Is this a bug or am I just missing something?
>

Friday, February 24, 2012

Database mail attachments are filling the hard disk

My company started using database mail recently.Most emails sent have relatively large attachments. We've set up procedures for removing emails older than a given period of time from the MSDB database, however we've now had a server completely run out of the disk space due to attachments being stored in the C:\Documents and Settings\User\Local Settings\Temp folder!?! sysmail_delete_mailitems_sp sproc only removes entries in the MSDB tables, and doesn't remove these temporary files in the temp directory.

Somebody claims that those temp files are needed in case the file being attached is deleted before it has been sent for example. I'm agree with the procedure, but... Why SQL server does not delete the temporary file after a sucessfull delivery of the message?

It is not too hard to code some job to delete these files daily, but ... Is it too hard for Microsoft Team to develop this simple functionality?

Thanks,

Philip

I think that temp directory is associated to operating system for such actions its better to code a seperate steps to drop those temp files too. Also if you have any anti-virus or anti-spyware tool installed on the server then these will be in exclusive usage hence operating system may not delete them, hence the explicit deletion is required.

I feel this is a good feature to have, you could provide such feedback on http://connect.microsoft.com site in thsi case to involve on next Service pack or in SQL 2008 release.