Friday, March 30, 2012
Maintenance Plan Fails but I can't figure out why? No log informa
consists of:
1 Backup Database
2 Cleanup Task
3 Reorganize Index Task
4 Rebuild Index Task
5 Shrink Database Task
6 Update Statistics Task
I have a notification message configured for errors. For some reason I
receive two emails. One states success while the other states failure. On
the success email I do not see any mention of steps 3,4 or 6 (from above). I
cannot find any additional information in the logs. Below are the two
emails. These emails are sent out back to back. Thanks in advance for your
help.
Terry
###################################################
Success Email
Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.2047 Report
was generated on "MSSQL".
Maintenance Plan: Database Backups
Duration: 08:26:44
Status: Succeeded.
Details:
Back Up Database (Full) (MSSQL)
Task start: 9/28/2007 9:00 PM.
Task end: 9/28/2007 9:07 PM.
Success
BAK Cleanup Task (MSSQL)
Task start: 9/28/2007 9:07 PM.
Task end: 9/28/2007 9:07 PM.
Success
Shrink Database Task (MSSQL)
Task start: 9/29/2007 3:33 AM.
Task end: 9/29/2007 3:35 AM.
Success
###################################################
Failed Email
OB RUN: 'Database Backups.Subplan' was run on 9/28/2007 at 9:00:01 PM
DURATION: 8 hours, 26 minutes, 51 seconds
STATUS: Failed
MESSAGES: The job failed. The Job was invoked by Schedule 1
(BackupDatabaseJob). The last step to run was step 1 (Subplan).Hello Terry!
Check out Jobs' histories from the Jobs node under SQL Server Agent. There,
you will find the one which doesn't work. It stops your maintenance plan.
Besides, you better setup your maintenance plan one by one, not an "all in
one" package.
Ekrem Ã?nsoy
"Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
news:F4444EBE-47FE-4C21-804E-71CB320513D7@.microsoft.com...
>I have a maintenance plan that is failing but I'm not sure why. Plan
> consists of:
> 1 Backup Database
> 2 Cleanup Task
> 3 Reorganize Index Task
> 4 Rebuild Index Task
> 5 Shrink Database Task
> 6 Update Statistics Task
> I have a notification message configured for errors. For some reason I
> receive two emails. One states success while the other states failure.
> On
> the success email I do not see any mention of steps 3,4 or 6 (from above).
> I
> cannot find any additional information in the logs. Below are the two
> emails. These emails are sent out back to back. Thanks in advance for
> your
> help.
> Terry
> ###################################################
> Success Email
> Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.2047 Report
> was generated on "MSSQL".
> Maintenance Plan: Database Backups
> Duration: 08:26:44
> Status: Succeeded.
> Details:
> Back Up Database (Full) (MSSQL)
> Task start: 9/28/2007 9:00 PM.
> Task end: 9/28/2007 9:07 PM.
> Success
>
> BAK Cleanup Task (MSSQL)
> Task start: 9/28/2007 9:07 PM.
> Task end: 9/28/2007 9:07 PM.
> Success
>
> Shrink Database Task (MSSQL)
> Task start: 9/29/2007 3:33 AM.
> Task end: 9/29/2007 3:35 AM.
> Success
>
> ###################################################
> Failed Email
> OB RUN: 'Database Backups.Subplan' was run on 9/28/2007 at 9:00:01 PM
> DURATION: 8 hours, 26 minutes, 51 seconds
> STATUS: Failed
> MESSAGES: The job failed. The Job was invoked by Schedule 1
> (BackupDatabaseJob). The last step to run was step 1 (Subplan).
>|||Hi Ekrem,
Thank you for the reply. I checked out the history logs for the job and
what is strange is that there are no entries? I right clicked on the job and
selected 'View Histories' but no entries. Can you think of a reason why I'm
not seeing any data?
Thanks,
Terry
"Ekrem Ã?nsoy" wrote:
> Hello Terry!
>
> Check out Jobs' histories from the Jobs node under SQL Server Agent. There,
> you will find the one which doesn't work. It stops your maintenance plan.
> Besides, you better setup your maintenance plan one by one, not an "all in
> one" package.
>
> --
> Ekrem Ã?nsoy
>
> "Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
> news:F4444EBE-47FE-4C21-804E-71CB320513D7@.microsoft.com...
> >I have a maintenance plan that is failing but I'm not sure why. Plan
> > consists of:
> > 1 Backup Database
> > 2 Cleanup Task
> > 3 Reorganize Index Task
> > 4 Rebuild Index Task
> > 5 Shrink Database Task
> > 6 Update Statistics Task
> >
> > I have a notification message configured for errors. For some reason I
> > receive two emails. One states success while the other states failure.
> > On
> > the success email I do not see any mention of steps 3,4 or 6 (from above).
> > I
> > cannot find any additional information in the logs. Below are the two
> > emails. These emails are sent out back to back. Thanks in advance for
> > your
> > help.
> >
> > Terry
> >
> > ###################################################
> > Success Email
> > Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.2047 Report
> > was generated on "MSSQL".
> > Maintenance Plan: Database Backups
> > Duration: 08:26:44
> > Status: Succeeded.
> > Details:
> > Back Up Database (Full) (MSSQL)
> > Task start: 9/28/2007 9:00 PM.
> > Task end: 9/28/2007 9:07 PM.
> > Success
> >
> >
> > BAK Cleanup Task (MSSQL)
> > Task start: 9/28/2007 9:07 PM.
> > Task end: 9/28/2007 9:07 PM.
> > Success
> >
> >
> > Shrink Database Task (MSSQL)
> > Task start: 9/29/2007 3:33 AM.
> > Task end: 9/29/2007 3:35 AM.
> > Success
> >
> >
> > ###################################################
> > Failed Email
> > OB RUN: 'Database Backups.Subplan' was run on 9/28/2007 at 9:00:01 PM
> > DURATION: 8 hours, 26 minutes, 51 seconds
> > STATUS: Failed
> > MESSAGES: The job failed. The Job was invoked by Schedule 1
> > (BackupDatabaseJob). The last step to run was step 1 (Subplan).
> >
>|||Hi Terry,
Could you tell me exactly what version and edition of SQL Server do you use?
First two reasons I can think of:
1- You did not select the checkbox just at the left side of the job name
from the Log File Viewer window.
2- The Jobs have never worked (in your case, some of them worked, so this
must not be valid for you)
P.S.
You use SSMS, not SSMSE right?
Ekrem Ã?nsoy
"Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
news:BA438105-C888-45E8-8E7E-623852F82345@.microsoft.com...
> Hi Ekrem,
> Thank you for the reply. I checked out the history logs for the job and
> what is strange is that there are no entries? I right clicked on the job
> and
> selected 'View Histories' but no entries. Can you think of a reason why
> I'm
> not seeing any data?
> Thanks,
> Terry
> "Ekrem Ã?nsoy" wrote:
>> Hello Terry!
>>
>> Check out Jobs' histories from the Jobs node under SQL Server Agent.
>> There,
>> you will find the one which doesn't work. It stops your maintenance plan.
>> Besides, you better setup your maintenance plan one by one, not an "all
>> in
>> one" package.
>>
>> --
>> Ekrem Ã?nsoy
>>
>> "Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
>> news:F4444EBE-47FE-4C21-804E-71CB320513D7@.microsoft.com...
>> >I have a maintenance plan that is failing but I'm not sure why. Plan
>> > consists of:
>> > 1 Backup Database
>> > 2 Cleanup Task
>> > 3 Reorganize Index Task
>> > 4 Rebuild Index Task
>> > 5 Shrink Database Task
>> > 6 Update Statistics Task
>> >
>> > I have a notification message configured for errors. For some reason I
>> > receive two emails. One states success while the other states failure.
>> > On
>> > the success email I do not see any mention of steps 3,4 or 6 (from
>> > above).
>> > I
>> > cannot find any additional information in the logs. Below are the two
>> > emails. These emails are sent out back to back. Thanks in advance for
>> > your
>> > help.
>> >
>> > Terry
>> >
>> > ###################################################
>> > Success Email
>> > Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.2047
>> > Report
>> > was generated on "MSSQL".
>> > Maintenance Plan: Database Backups
>> > Duration: 08:26:44
>> > Status: Succeeded.
>> > Details:
>> > Back Up Database (Full) (MSSQL)
>> > Task start: 9/28/2007 9:00 PM.
>> > Task end: 9/28/2007 9:07 PM.
>> > Success
>> >
>> >
>> > BAK Cleanup Task (MSSQL)
>> > Task start: 9/28/2007 9:07 PM.
>> > Task end: 9/28/2007 9:07 PM.
>> > Success
>> >
>> >
>> > Shrink Database Task (MSSQL)
>> > Task start: 9/29/2007 3:33 AM.
>> > Task end: 9/29/2007 3:35 AM.
>> > Success
>> >
>> >
>> > ###################################################
>> > Failed Email
>> > OB RUN: 'Database Backups.Subplan' was run on 9/28/2007 at 9:00:01 PM
>> > DURATION: 8 hours, 26 minutes, 51 seconds
>> > STATUS: Failed
>> > MESSAGES: The job failed. The Job was invoked by Schedule 1
>> > (BackupDatabaseJob). The last step to run was step 1 (Subplan).
>> >|||Hi Ekrem,
Using SQL Server 2005 (9.00.2047) and SQL Server Management Studio.
This is what I've did:
Expanded 'SQL Server Agent', Expanded Jobs, Right clicked on job (Database
Backups.Subplan) and selected 'View History'. When the dialog displays the
job is selected.
Thanks,
Terry
"Ekrem Ã?nsoy" wrote:
> Hi Terry,
>
> Could you tell me exactly what version and edition of SQL Server do you use?
> First two reasons I can think of:
> 1- You did not select the checkbox just at the left side of the job name
> from the Log File Viewer window.
> 2- The Jobs have never worked (in your case, some of them worked, so this
> must not be valid for you)
> P.S.
> You use SSMS, not SSMSE right?
>
> --
> Ekrem Ã?nsoy
>
> "Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
> news:BA438105-C888-45E8-8E7E-623852F82345@.microsoft.com...
> > Hi Ekrem,
> > Thank you for the reply. I checked out the history logs for the job and
> > what is strange is that there are no entries? I right clicked on the job
> > and
> > selected 'View Histories' but no entries. Can you think of a reason why
> > I'm
> > not seeing any data?
> > Thanks,
> > Terry
> >
> > "Ekrem Ã?nsoy" wrote:
> >
> >> Hello Terry!
> >>
> >>
> >> Check out Jobs' histories from the Jobs node under SQL Server Agent.
> >> There,
> >> you will find the one which doesn't work. It stops your maintenance plan.
> >>
> >> Besides, you better setup your maintenance plan one by one, not an "all
> >> in
> >> one" package.
> >>
> >>
> >> --
> >> Ekrem Ã?nsoy
> >>
> >>
> >>
> >> "Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
> >> news:F4444EBE-47FE-4C21-804E-71CB320513D7@.microsoft.com...
> >> >I have a maintenance plan that is failing but I'm not sure why. Plan
> >> > consists of:
> >> > 1 Backup Database
> >> > 2 Cleanup Task
> >> > 3 Reorganize Index Task
> >> > 4 Rebuild Index Task
> >> > 5 Shrink Database Task
> >> > 6 Update Statistics Task
> >> >
> >> > I have a notification message configured for errors. For some reason I
> >> > receive two emails. One states success while the other states failure.
> >> > On
> >> > the success email I do not see any mention of steps 3,4 or 6 (from
> >> > above).
> >> > I
> >> > cannot find any additional information in the logs. Below are the two
> >> > emails. These emails are sent out back to back. Thanks in advance for
> >> > your
> >> > help.
> >> >
> >> > Terry
> >> >
> >> > ###################################################
> >> > Success Email
> >> > Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.2047
> >> > Report
> >> > was generated on "MSSQL".
> >> > Maintenance Plan: Database Backups
> >> > Duration: 08:26:44
> >> > Status: Succeeded.
> >> > Details:
> >> > Back Up Database (Full) (MSSQL)
> >> > Task start: 9/28/2007 9:00 PM.
> >> > Task end: 9/28/2007 9:07 PM.
> >> > Success
> >> >
> >> >
> >> > BAK Cleanup Task (MSSQL)
> >> > Task start: 9/28/2007 9:07 PM.
> >> > Task end: 9/28/2007 9:07 PM.
> >> > Success
> >> >
> >> >
> >> > Shrink Database Task (MSSQL)
> >> > Task start: 9/29/2007 3:33 AM.
> >> > Task end: 9/29/2007 3:35 AM.
> >> > Success
> >> >
> >> >
> >> > ###################################################
> >> > Failed Email
> >> > OB RUN: 'Database Backups.Subplan' was run on 9/28/2007 at 9:00:01 PM
> >> > DURATION: 8 hours, 26 minutes, 51 seconds
> >> > STATUS: Failed
> >> > MESSAGES: The job failed. The Job was invoked by Schedule 1
> >> > (BackupDatabaseJob). The last step to run was step 1 (Subplan).
> >> >
> >>
>|||Hi Terry!
Can you check the Filter setting in the Log Viewer window? If it's set to
some values then click Clear button in the Filter Settings window and click
OK.
Check if other logs are clear or do they have records from the Log File
Viewer? (SQL Agent logs for example)
If it is not your situation, then can you take a look at your Instance path?
Check if log files are stored or not.
For Example: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG
Note:
I once faced this problem but in that situation the person who met this
problem was using SSMSE and when he started using SSMS he started seeing
logs.
--
Ekrem Ã?nsoy
"Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
news:0725AFDB-ED8A-4F3E-8712-EDAA3F097B15@.microsoft.com...
> Hi Ekrem,
> Using SQL Server 2005 (9.00.2047) and SQL Server Management Studio.
> This is what I've did:
> Expanded 'SQL Server Agent', Expanded Jobs, Right clicked on job (Database
> Backups.Subplan) and selected 'View History'. When the dialog displays
> the
> job is selected.
> Thanks,
> Terry
>
> "Ekrem Ã?nsoy" wrote:
>> Hi Terry,
>>
>> Could you tell me exactly what version and edition of SQL Server do you
>> use?
>> First two reasons I can think of:
>> 1- You did not select the checkbox just at the left side of the job name
>> from the Log File Viewer window.
>> 2- The Jobs have never worked (in your case, some of them worked, so this
>> must not be valid for you)
>> P.S.
>> You use SSMS, not SSMSE right?
>>
>> --
>> Ekrem Ã?nsoy
>>
>> "Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
>> news:BA438105-C888-45E8-8E7E-623852F82345@.microsoft.com...
>> > Hi Ekrem,
>> > Thank you for the reply. I checked out the history logs for the job
>> > and
>> > what is strange is that there are no entries? I right clicked on the
>> > job
>> > and
>> > selected 'View Histories' but no entries. Can you think of a reason
>> > why
>> > I'm
>> > not seeing any data?
>> > Thanks,
>> > Terry
>> >
>> > "Ekrem Ã?nsoy" wrote:
>> >
>> >> Hello Terry!
>> >>
>> >>
>> >> Check out Jobs' histories from the Jobs node under SQL Server Agent.
>> >> There,
>> >> you will find the one which doesn't work. It stops your maintenance
>> >> plan.
>> >>
>> >> Besides, you better setup your maintenance plan one by one, not an
>> >> "all
>> >> in
>> >> one" package.
>> >>
>> >>
>> >> --
>> >> Ekrem Ã?nsoy
>> >>
>> >>
>> >>
>> >> "Terry Wahl" <TerryWahl@.discussions.microsoft.com> wrote in message
>> >> news:F4444EBE-47FE-4C21-804E-71CB320513D7@.microsoft.com...
>> >> >I have a maintenance plan that is failing but I'm not sure why. Plan
>> >> > consists of:
>> >> > 1 Backup Database
>> >> > 2 Cleanup Task
>> >> > 3 Reorganize Index Task
>> >> > 4 Rebuild Index Task
>> >> > 5 Shrink Database Task
>> >> > 6 Update Statistics Task
>> >> >
>> >> > I have a notification message configured for errors. For some
>> >> > reason I
>> >> > receive two emails. One states success while the other states
>> >> > failure.
>> >> > On
>> >> > the success email I do not see any mention of steps 3,4 or 6 (from
>> >> > above).
>> >> > I
>> >> > cannot find any additional information in the logs. Below are the
>> >> > two
>> >> > emails. These emails are sent out back to back. Thanks in advance
>> >> > for
>> >> > your
>> >> > help.
>> >> >
>> >> > Terry
>> >> >
>> >> > ###################################################
>> >> > Success Email
>> >> > Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.2047
>> >> > Report
>> >> > was generated on "MSSQL".
>> >> > Maintenance Plan: Database Backups
>> >> > Duration: 08:26:44
>> >> > Status: Succeeded.
>> >> > Details:
>> >> > Back Up Database (Full) (MSSQL)
>> >> > Task start: 9/28/2007 9:00 PM.
>> >> > Task end: 9/28/2007 9:07 PM.
>> >> > Success
>> >> >
>> >> >
>> >> > BAK Cleanup Task (MSSQL)
>> >> > Task start: 9/28/2007 9:07 PM.
>> >> > Task end: 9/28/2007 9:07 PM.
>> >> > Success
>> >> >
>> >> >
>> >> > Shrink Database Task (MSSQL)
>> >> > Task start: 9/29/2007 3:33 AM.
>> >> > Task end: 9/29/2007 3:35 AM.
>> >> > Success
>> >> >
>> >> >
>> >> > ###################################################
>> >> > Failed Email
>> >> > OB RUN: 'Database Backups.Subplan' was run on 9/28/2007 at 9:00:01
>> >> > PM
>> >> > DURATION: 8 hours, 26 minutes, 51 seconds
>> >> > STATUS: Failed
>> >> > MESSAGES: The job failed. The Job was invoked by Schedule 1
>> >> > (BackupDatabaseJob). The last step to run was step 1 (Subplan).
>> >> >
>> >>|||Ekrem Ã?nsoy wrote:
> Hi Terry!
>
> Can you check the Filter setting in the Log Viewer window? If it's set
> to some values then click Clear button in the Filter Settings window
> and click OK.
> Check if other logs are clear or do they have records from the Log
> File Viewer? (SQL Agent logs for example)
> If it is not your situation, then can you take a look at your Instance
> path? Check if log files are stored or not.
> For Example: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG
> Note:
> I once faced this problem but in that situation the person who met
> this problem was using SSMSE and when he started using SSMS he started
> seeing logs.
>
Instead of viewing history on the SQL Agent job - view the history on
the maintenance plan. The history here will show each step in the
maintenance plan and should identify why the other steps are failing.
My guess as to why you are getting two messages is that the steps in the
maintenance plan are not sequenced. In the maintenance plan editor, you
need to drag the green arrow (go to next step on success) or the blue
arrow (go to next step on completion) and perform each step in the
maintenance plan in sequence. If your jobs are not sequenced - those
other steps are probably failing because they cannot obtain a lock or
are blocked by the other steps.
And finally, you do not need to perform all of those steps - and not in
the order you listed them. I generally run the following:
Integrity Checks (DBCC CHECKDB)
On Success: Rebuild/Reorganize Indexes
On Success: Backup Database
On Success: Maintenance Plan Cleanup Task
Depending upon the system, I may include a step to Update Statistics and
would include that step right before the backup. You should not shrink
the database as it will only grow again, especially when you are
rebuilding indexes. Make sure your database has been sized large enough
so that the rebuild index operation does not grow the database
(generally 20% free).
Jeff|||Hi Jeffrey,
Thanks for the reply. All the tasks are sequenced (blue connections). I
took a look at the history logs as you mentioned (thanks) but what is strange
is not all the task are contained in the log but yet the ones that are there
show success. I have turned on extended logging and I initially removed the
'Reorganize Index Task' and 'Rebuild Index Task' steps. When I did this
everything worked and all 4 entries are listed in the log. I later added
back the 'Reorganize Index Task' and the job failed. As mentioned above when
I view the log I do not see all the steps and the ones that are listed show
success. The 'Reorganize Index Task' is not listed. No failed steps are
listed. Strange deal.
Thanks,
Terry
"Jeffrey Williams" wrote:
> Ekrem Ã?nsoy wrote:
> > Hi Terry!
> >
> >
> > Can you check the Filter setting in the Log Viewer window? If it's set
> > to some values then click Clear button in the Filter Settings window
> > and click OK.
> >
> > Check if other logs are clear or do they have records from the Log
> > File Viewer? (SQL Agent logs for example)
> >
> > If it is not your situation, then can you take a look at your Instance
> > path? Check if log files are stored or not.
> > For Example: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG
> >
> > Note:
> > I once faced this problem but in that situation the person who met
> > this problem was using SSMSE and when he started using SSMS he started
> > seeing logs.
> >
> Instead of viewing history on the SQL Agent job - view the history on
> the maintenance plan. The history here will show each step in the
> maintenance plan and should identify why the other steps are failing.
> My guess as to why you are getting two messages is that the steps in the
> maintenance plan are not sequenced. In the maintenance plan editor, you
> need to drag the green arrow (go to next step on success) or the blue
> arrow (go to next step on completion) and perform each step in the
> maintenance plan in sequence. If your jobs are not sequenced - those
> other steps are probably failing because they cannot obtain a lock or
> are blocked by the other steps.
> And finally, you do not need to perform all of those steps - and not in
> the order you listed them. I generally run the following:
> Integrity Checks (DBCC CHECKDB)
> On Success: Rebuild/Reorganize Indexes
> On Success: Backup Database
> On Success: Maintenance Plan Cleanup Task
> Depending upon the system, I may include a step to Update Statistics and
> would include that step right before the backup. You should not shrink
> the database as it will only grow again, especially when you are
> rebuilding indexes. Make sure your database has been sized large enough
> so that the rebuild index operation does not grow the database
> (generally 20% free).
> Jeff
>
Wednesday, March 28, 2012
Maintenance Plan does not delete old .bak files
I chose:
connection: local server connection
type: backup files
search files based on an extension
path to files
ext = bak
Delete files older than 4 weeks.
I run it and it never removes any of the files--what gives.What version on SQL you are using. IF you have installed SQL2005 SP2 before march 6th, then there is a know bug on cleanup task. You can download the latest SP2 build and install.
|||
This problem has been fixed in the latest Cumulative Update. Call MS Customer Service and ask for the SQL Server cumulative update. There is no charge for this service.
jkh
sqlmaintenance plan Cleanup Task
Hello all,
What is the latest after SP2 on the Maintenace Cleanup Task?
Has anyone been able to successfully delete old backup files(*.bak) and tran logs (*.trn) TOGETHER using maintenance plan cleanup task in SQL 2005 SP2 with all the htfixes instaled? .
In other words can EXECUTE master.dbo.xp_delete_file 0,N'D:\backups',N'bak',N'2007-07-12T10:12:03',1 be used with bak and trn at the same time
Thanks in advanced
This has been fixed in the latest cumulative update for SQL Server. Contact Customer Support and they will direct you to the fix.
jkh
maintenance plan Cleanup Task
Hello all,
What is the latest after SP2 on the Maintenace Cleanup Task?
Has anyone been able to successfully delete old backup files(*.bak) and tran logs (*.trn) TOGETHER using maintenance plan cleanup task in SQL 2005 SP2 with all the htfixes instaled? .
In other words can EXECUTE master.dbo.xp_delete_file 0,N'D:\backups',N'bak',N'2007-07-12T10:12:03',1 be used with bak and trn at the same time
Thanks in advanced
This has been fixed in the latest cumulative update for SQL Server. Contact Customer Support and they will direct you to the fix.
jkh
Friday, March 23, 2012
Maintenance Cleanup Task……
SQL Server 2005 Standard Edition
Windows Server 2003.
I have created an ‘Backup Database Task’ to create the database backups and checked the option “Create a subdirectory for each database”.
When I add the “Maintenance Cleanup Task” I am not getting the similar option to clean the backup files in the subdirectory.
Any suggestion on how to solve this?
I can always uncheck the “Create a subdirectory for each database” option to create the backup files in one location.
Thank you,
Smith
Smith,Once you create a Sub directory the backup files will be placed there...now in the clean up task there is an option called "Search folder and delete files based on an extension" you need to specify the sub directory folder in the above mentioned option........the clean up task will delete it and also you need to psecify the extension as "bak" to delete backup files.........refer the below link,
http://www.sql-server-performance.com/articles/dba/creating_backup_jobs_p2.aspx
|||
This article could be helpful for you
http://msdn2.microsoft.com/en-us/library/ms345177.aspx
|||Deepak,
This link says...
"To delete the first-level subfolders, you must explicitly elect to do this by checking the Include first-level subfolders option in the Maintenance Cleanup Task dialog box."
I am not finding the "Includefirst-level subfolders" option to check.
How to check this option.
Thank you
-Smith
|||Hi,
What Service Pack are you on? You should be getting that option when you Edit the Maintenance Plab Sub-task "Clean up Maintenance Task"
|||select @.@.version
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Thanks,
|||Try to install SQL 2005 SP2 critical update fromhttp://www.microsoft.com/downloads/details.aspx?FamilyId=e2c358a1-ecc4-4c49-8f65-daa6b7800eec&displaylang=en
refer the below link,
http://support.microsoft.com/kb/933508 as there were many problems relating to maintenance plan which were fixed with critical update ! ! !
|||
Thank you for your suggestions in resolving this issue.
Since it is not a critical issue affecting the production I will wait for the SP3 :-)
Infact when I installed the SP2 I did download the latest copy available.
Thank you,
|||Well i don't think SP3 would be released for sql 2005 as sql 2008 is going to be released in Feb 2008Maintenance Cleanup Task……
SQL Server 2005 Standard Edition
Windows Server 2003.
I have created an ‘Backup Database Task’ to create the database backups and checked the option “Create a subdirectory for each database”.
When I add the “Maintenance Cleanup Task” I am not getting the similar option to clean the backup files in the subdirectory.
Any suggestion on how to solve this?
I can always uncheck the “Create a subdirectory for each database” option to create the backup files in one location.
Thank you,
Smith
Smith,Once you create a Sub directory the backup files will be placed there...now in the clean up task there is an option called "Search folder and delete files based on an extension" you need to specify the sub directory folder in the above mentioned option........the clean up task will delete it and also you need to psecify the extension as "bak" to delete backup files.........refer the below link,
http://www.sql-server-performance.com/articles/dba/creating_backup_jobs_p2.aspx
|||
This article could be helpful for you
http://msdn2.microsoft.com/en-us/library/ms345177.aspx
|||Deepak,
This link says...
"To delete the first-level subfolders, you must explicitly elect to do this by checking the Include first-level subfolders option in the Maintenance Cleanup Task dialog box."
I am not finding the "Includefirst-level subfolders" option to check.
How to check this option.
Thank you
-Smith
|||Hi,
What Service Pack are you on? You should be getting that option when you Edit the Maintenance Plab Sub-task "Clean up Maintenance Task"
|||select @.@.version
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Thanks,
|||Try to install SQL 2005 SP2 critical update fromhttp://www.microsoft.com/downloads/details.aspx?FamilyId=e2c358a1-ecc4-4c49-8f65-daa6b7800eec&displaylang=en
refer the below link,
http://support.microsoft.com/kb/933508 as there were many problems relating to maintenance plan which were fixed with critical update ! ! !
|||
Thank you for your suggestions in resolving this issue.
Since it is not a critical issue affecting the production I will wait for the SP3 :-)
Infact when I installed the SP2 I did download the latest copy available.
Thank you,
|||Well i don't think SP3 would be released for sql 2005 as sql 2008 is going to be released in Feb 2008Maintenance Cleanup Task……
SQL Server 2005 Standard Edition
Windows Server 2003.
I have created an ‘Backup Database Task’ to create the database backups and checked the option “Create a subdirectory for each database”.
When I add the “Maintenance Cleanup Task” I am not getting the similar option to clean the backup files in the subdirectory.
Any suggestion on how to solve this?
I can always uncheck the “Create a subdirectory for each database” option to create the backup files in one location.
Thank you,
Smith
Smith,Once you create a Sub directory the backup files will be placed there...now in the clean up task there is an option called "Search folder and delete files based on an extension" you need to specify the sub directory folder in the above mentioned option........the clean up task will delete it and also you need to psecify the extension as "bak" to delete backup files.........refer the below link,
http://www.sql-server-performance.com/articles/dba/creating_backup_jobs_p2.aspx
|||
This article could be helpful for you
http://msdn2.microsoft.com/en-us/library/ms345177.aspx
|||Deepak,
This link says...
"To delete the first-level subfolders, you must explicitly elect to do this by checking the Include first-level subfolders option in the Maintenance Cleanup Task dialog box."
I am not finding the "Includefirst-level subfolders" option to check.
How to check this option.
Thank you
-Smith
|||Hi,
What Service Pack are you on? You should be getting that option when you Edit the Maintenance Plab Sub-task "Clean up Maintenance Task"
|||select @.@.version
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Thanks,
|||Try to install SQL 2005 SP2 critical update fromhttp://www.microsoft.com/downloads/details.aspx?FamilyId=e2c358a1-ecc4-4c49-8f65-daa6b7800eec&displaylang=en
refer the below link,
http://support.microsoft.com/kb/933508 as there were many problems relating to maintenance plan which were fixed with critical update ! ! !
|||
Thank you for your suggestions in resolving this issue.
Since it is not a critical issue affecting the production I will wait for the SP3 :-)
Infact when I installed the SP2 I did download the latest copy available.
Thank you,
|||Well i don't think SP3 would be released for sql 2005 as sql 2008 is going to be released in Feb 2008sql
Maintenance Cleanup Task……
SQL Server 2005 Standard Edition
Windows Server 2003.
I have created an ‘Backup Database Task’ to create the database backups and checked the option “Create a subdirectory for each database”.
When I add the “Maintenance Cleanup Task” I am not getting the similar option to clean the backup files in the subdirectory.
Any suggestion on how to solve this?
I can always uncheck the “Create a subdirectory for each database” option to create the backup files in one location.
Thank you,
Smith
Smith,Once you create a Sub directory the backup files will be placed there...now in the clean up task there is an option called "Search folder and delete files based on an extension" you need to specify the sub directory folder in the above mentioned option........the clean up task will delete it and also you need to psecify the extension as "bak" to delete backup files.........refer the below link,
http://www.sql-server-performance.com/articles/dba/creating_backup_jobs_p2.aspx
|||
This article could be helpful for you
http://msdn2.microsoft.com/en-us/library/ms345177.aspx
|||Deepak,
This link says...
"To delete the first-level subfolders, you must explicitly elect to do this by checking the Include first-level subfolders option in the Maintenance Cleanup Task dialog box."
I am not finding the "Includefirst-level subfolders" option to check.
How to check this option.
Thank you
-Smith
|||Hi,
What Service Pack are you on? You should be getting that option when you Edit the Maintenance Plab Sub-task "Clean up Maintenance Task"
|||select @.@.version
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Thanks,
|||Try to install SQL 2005 SP2 critical update fromhttp://www.microsoft.com/downloads/details.aspx?FamilyId=e2c358a1-ecc4-4c49-8f65-daa6b7800eec&displaylang=en
refer the below link,
http://support.microsoft.com/kb/933508 as there were many problems relating to maintenance plan which were fixed with critical update ! ! !
|||
Thank you for your suggestions in resolving this issue.
Since it is not a critical issue affecting the production I will wait for the SP3 :-)
Infact when I installed the SP2 I did download the latest copy available.
Thank you,
|||Well i don't think SP3 would be released for sql 2005 as sql 2008 is going to be released in Feb 2008Maintenance Cleanup task not functioning properly?
What part of this TSQL code does SQL Server 2005 Management Studio not understand?
EXECUTE master.dbo.xp_delete_file 0,N'\\pdxsql03\SQL Backup\POSSQL_Server',N'.bak',N'05/15/2006 08:09:37'
The database file backup extension is .bak and the file is older than one day which was specified.
It is just not deleting the file.
We have deleted the maintenance task and recreated it with no effect and this has been happening for over a month.
Any help here would be greatly appreciated.
Carl
carlt@.gicw.org
I've been having the same problem for over three months now and keep checking back here to see if there's been a fix....
|||http://blogs.msdn.com/sanchan/archive/2006/04/23/581640.aspx
This is addressed in SP1. Please look at the above blog for more information.
Gops Dwarak
|||The trick is to replace .bak with *.*
It definitely works. :-)
|||I tried to replace the extension "bak" with "*.*", "*" and ".*" I know this looks like the meeting of the disabled Smilie group, but you know what I mean. It definitely _DOESN′T_ delete any backups. However, when I execute the t-sql created by the maintenance Cleanup Task, it deletes the files.
Any suggestions?
|||Not working for me either. SP1 applied and all. Subdirectories for backups. .. trying to delete archived backups, in the form Filename.bak.7z. No worky worky!Please advise? (Read: How hard is it to implement a functioning XSP?!)|||
My solution was to take the T-SQL created by the cleanup task and modifying it slightly:
declare @.dt datetime
select @.dt=getdate()-5
EXECUTE master.dbo.xp_delete_file 0,N'E:\Backups',N'BAK',@.dt,1
The variable is used to check the age of the backup-files. In this case, all backups older than 5 days are deleted. The last Number (=1) gives the number of subdirectories to be searched in for .bak-files. AFAIK a maximum of 5 subdirs is supported.
Then you can take it and put it into an "execute SQL"-Task, take the package and schedule it or directly schedule it in the Job Scheduler of Management Studio as SQL-Statement
|||The workaround above may or may not work, depending on what the problem is.
To get to the bottom of the problem - what is the exact error that you are getting? We can then search if this is a known problem. There were number of issues with Cleanup task. A few were fixed in SP1, like Gops has mentioned, more were fixed in SP2 which is in the CTP release right now. If you can, please install SQL Server 2005 SP2 CTP December from here: http://www.microsoft.com/sql/ctp.mspx and let us know if the problem sitll exists.
Regards,
Maciek Sarnowicz
|||I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
Thanks,
-lance
|||There is an "off by one" bug using the time unit of measure in "Maintenance" and "Cleanup" tasks.
If you select "Weeks" you get "Days", with "Days" you get "Hours", and "Hours" blows the index.
The patching procedure is a little complicated. Read this:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
|||-lance wrote:
I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
You are running SQL Server 2005 Service Pack 2 (9.00.3054.00).
You are running Windows Server 2003 Service Pack 1.
Hope this clears up your confusion.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
|||
I was also having a similar issue. First the cleanup task would just not delete any files no matter where I pointed it to. I originally had put “.trn” in the file extension box. I then removed the . and everything deleted correctly. The problem we then ran into was that it would only delete from the top level folder that we pointed to. In another blog I read that I must check the Include first-level subfolders box to delete from these sub folders. The problem is that this checkbox is nowhere to be found on the maintenance cleanup task dialog box. We do have service pack 2 loaded and most of the updates but….?
I finally just got the T-SQL statement and created my own job.
This is the original statement:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18'
Is simply added a 1 to the end of the statement and made it:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18',1
This job runs great and deletes all the files on level below the top level folder. I did try adding a 2 to see if it would let me delete further levels but it errors out. Hope this helps somebody!
Maintenance Cleanup task not functioning properly?
What part of this TSQL code does SQL Server 2005 Management Studio not understand?
EXECUTE master.dbo.xp_delete_file 0,N'\\pdxsql03\SQL Backup\POSSQL_Server',N'.bak',N'05/15/2006 08:09:37'
The database file backup extension is .bak and the file is older than one day which was specified.
It is just not deleting the file.
We have deleted the maintenance task and recreated it with no effect and this has been happening for over a month.
Any help here would be greatly appreciated.
Carl
carlt@.gicw.org
I've been having the same problem for over three months now and keep checking back here to see if there's been a fix....
|||http://blogs.msdn.com/sanchan/archive/2006/04/23/581640.aspx
This is addressed in SP1. Please look at the above blog for more information.
Gops Dwarak
|||The trick is to replace .bak with *.*
It definitely works. :-)
|||I tried to replace the extension "bak" with "*.*", "*" and ".*" I know this looks like the meeting of the disabled Smilie group, but you know what I mean. It definitely _DOESN′T_ delete any backups. However, when I execute the t-sql created by the maintenance Cleanup Task, it deletes the files.
Any suggestions?
|||Not working for me either. SP1 applied and all. Subdirectories for backups. .. trying to delete archived backups, in the form Filename.bak.7z. No worky worky!Please advise? (Read: How hard is it to implement a functioning XSP?!)
|||
My solution was to take the T-SQL created by the cleanup task and modifying it slightly:
declare @.dt datetime
select @.dt=getdate()-5
EXECUTE master.dbo.xp_delete_file 0,N'E:\Backups',N'BAK',@.dt,1
The variable is used to check the age of the backup-files. In this case, all backups older than 5 days are deleted. The last Number (=1) gives the number of subdirectories to be searched in for .bak-files. AFAIK a maximum of 5 subdirs is supported.
Then you can take it and put it into an "execute SQL"-Task, take the package and schedule it or directly schedule it in the Job Scheduler of Management Studio as SQL-Statement
|||The workaround above may or may not work, depending on what the problem is.
To get to the bottom of the problem - what is the exact error that you are getting? We can then search if this is a known problem. There were number of issues with Cleanup task. A few were fixed in SP1, like Gops has mentioned, more were fixed in SP2 which is in the CTP release right now. If you can, please install SQL Server 2005 SP2 CTP December from here: http://www.microsoft.com/sql/ctp.mspx and let us know if the problem sitll exists.
Regards,
Maciek Sarnowicz
|||I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
Thanks,
-lance
|||There is an "off by one" bug using the time unit of measure in "Maintenance" and "Cleanup" tasks.
If you select "Weeks" you get "Days", with "Days" you get "Hours", and "Hours" blows the index.
The patching procedure is a little complicated. Read this:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
|||
-lance wrote:
I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
You are running SQL Server 2005 Service Pack 2 (9.00.3054.00).
You are running Windows Server 2003 Service Pack 1.
Hope this clears up your confusion.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
|||
I was also having a similar issue. First the cleanup task would just not delete any files no matter where I pointed it to. I originally had put “.trn” in the file extension box. I then removed the . and everything deleted correctly. The problem we then ran into was that it would only delete from the top level folder that we pointed to. In another blog I read that I must check the Include first-level subfolders box to delete from these sub folders. The problem is that this checkbox is nowhere to be found on the maintenance cleanup task dialog box. We do have service pack 2 loaded and most of the updates but….?
I finally just got the T-SQL statement and created my own job.
This is the original statement:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18'
Is simply added a 1 to the end of the statement and made it:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18',1
This job runs great and deletes all the files on level below the top level folder. I did try adding a 2 to see if it would let me delete further levels but it errors out. Hope this helps somebody!
Maintenance Cleanup task not functioning properly?
What part of this TSQL code does SQL Server 2005 Management Studio not understand?
EXECUTE master.dbo.xp_delete_file 0,N'\\pdxsql03\SQL Backup\POSSQL_Server',N'.bak',N'05/15/2006 08:09:37'
The database file backup extension is .bak and the file is older than one day which was specified.
It is just not deleting the file.
We have deleted the maintenance task and recreated it with no effect and this has been happening for over a month.
Any help here would be greatly appreciated.
Carl
carlt@.gicw.org
I've been having the same problem for over three months now and keep checking back here to see if there's been a fix....
|||http://blogs.msdn.com/sanchan/archive/2006/04/23/581640.aspx
This is addressed in SP1. Please look at the above blog for more information.
Gops Dwarak
|||The trick is to replace .bak with *.*
It definitely works. :-)
|||I tried to replace the extension "bak" with "*.*", "*" and ".*" I know this looks like the meeting of the disabled Smilie group, but you know what I mean. It definitely _DOESN′T_ delete any backups. However, when I execute the t-sql created by the maintenance Cleanup Task, it deletes the files.
Any suggestions?
|||Not working for me either. SP1 applied and all. Subdirectories for backups. .. trying to delete archived backups, in the form Filename.bak.7z. No worky worky!Please advise? (Read: How hard is it to implement a functioning XSP?!)|||
My solution was to take the T-SQL created by the cleanup task and modifying it slightly:
declare @.dt datetime
select @.dt=getdate()-5
EXECUTE master.dbo.xp_delete_file 0,N'E:\Backups',N'BAK',@.dt,1
The variable is used to check the age of the backup-files. In this case, all backups older than 5 days are deleted. The last Number (=1) gives the number of subdirectories to be searched in for .bak-files. AFAIK a maximum of 5 subdirs is supported.
Then you can take it and put it into an "execute SQL"-Task, take the package and schedule it or directly schedule it in the Job Scheduler of Management Studio as SQL-Statement
|||The workaround above may or may not work, depending on what the problem is.
To get to the bottom of the problem - what is the exact error that you are getting? We can then search if this is a known problem. There were number of issues with Cleanup task. A few were fixed in SP1, like Gops has mentioned, more were fixed in SP2 which is in the CTP release right now. If you can, please install SQL Server 2005 SP2 CTP December from here: http://www.microsoft.com/sql/ctp.mspx and let us know if the problem sitll exists.
Regards,
Maciek Sarnowicz
|||I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
Thanks,
-lance
|||There is an "off by one" bug using the time unit of measure in "Maintenance" and "Cleanup" tasks.
If you select "Weeks" you get "Days", with "Days" you get "Hours", and "Hours" blows the index.
The patching procedure is a little complicated. Read this:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
|||-lance wrote:
I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
You are running SQL Server 2005 Service Pack 2 (9.00.3054.00).
You are running Windows Server 2003 Service Pack 1.
Hope this clears up your confusion.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
|||
I was also having a similar issue. First the cleanup task would just not delete any files no matter where I pointed it to. I originally had put “.trn” in the file extension box. I then removed the . and everything deleted correctly. The problem we then ran into was that it would only delete from the top level folder that we pointed to. In another blog I read that I must check the Include first-level subfolders box to delete from these sub folders. The problem is that this checkbox is nowhere to be found on the maintenance cleanup task dialog box. We do have service pack 2 loaded and most of the updates but….?
I finally just got the T-SQL statement and created my own job.
This is the original statement:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18'
Is simply added a 1 to the end of the statement and made it:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18',1
This job runs great and deletes all the files on level below the top level folder. I did try adding a 2 to see if it would let me delete further levels but it errors out. Hope this helps somebody!
Maintenance Cleanup task not functioning properly?
What part of this TSQL code does SQL Server 2005 Management Studio not understand?
EXECUTE master.dbo.xp_delete_file 0,N'\\pdxsql03\SQL Backup\POSSQL_Server',N'.bak',N'05/15/2006 08:09:37'
The database file backup extension is .bak and the file is older than one day which was specified.
It is just not deleting the file.
We have deleted the maintenance task and recreated it with no effect and this has been happening for over a month.
Any help here would be greatly appreciated.
Carl
carlt@.gicw.org
I've been having the same problem for over three months now and keep checking back here to see if there's been a fix....
|||http://blogs.msdn.com/sanchan/archive/2006/04/23/581640.aspx
This is addressed in SP1. Please look at the above blog for more information.
Gops Dwarak
|||The trick is to replace .bak with *.*
It definitely works. :-)
|||I tried to replace the extension "bak" with "*.*", "*" and ".*" I know this looks like the meeting of the disabled Smilie group, but you know what I mean. It definitely _DOESN′T_ delete any backups. However, when I execute the t-sql created by the maintenance Cleanup Task, it deletes the files.
Any suggestions?
|||Not working for me either. SP1 applied and all. Subdirectories for backups. .. trying to delete archived backups, in the form Filename.bak.7z. No worky worky!Please advise? (Read: How hard is it to implement a functioning XSP?!)
|||
My solution was to take the T-SQL created by the cleanup task and modifying it slightly:
declare @.dt datetime
select @.dt=getdate()-5
EXECUTE master.dbo.xp_delete_file 0,N'E:\Backups',N'BAK',@.dt,1
The variable is used to check the age of the backup-files. In this case, all backups older than 5 days are deleted. The last Number (=1) gives the number of subdirectories to be searched in for .bak-files. AFAIK a maximum of 5 subdirs is supported.
Then you can take it and put it into an "execute SQL"-Task, take the package and schedule it or directly schedule it in the Job Scheduler of Management Studio as SQL-Statement
|||The workaround above may or may not work, depending on what the problem is.
To get to the bottom of the problem - what is the exact error that you are getting? We can then search if this is a known problem. There were number of issues with Cleanup task. A few were fixed in SP1, like Gops has mentioned, more were fixed in SP2 which is in the CTP release right now. If you can, please install SQL Server 2005 SP2 CTP December from here: http://www.microsoft.com/sql/ctp.mspx and let us know if the problem sitll exists.
Regards,
Maciek Sarnowicz
|||I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
Thanks,
-lance
|||There is an "off by one" bug using the time unit of measure in "Maintenance" and "Cleanup" tasks.
If you select "Weeks" you get "Days", with "Days" you get "Hours", and "Hours" blows the index.
The patching procedure is a little complicated. Read this:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
|||
-lance wrote:
I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
You are running SQL Server 2005 Service Pack 2 (9.00.3054.00).
You are running Windows Server 2003 Service Pack 1.
Hope this clears up your confusion.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
|||I was also having a similar issue. First the cleanup task would just not delete any files no matter where I pointed it to. I originally had put “.trn” in the file extension box. I then removed the . and everything deleted correctly. The problem we then ran into was that it would only delete from the top level folder that we pointed to. In another blog I read that I must check the Include first-level subfolders box to delete from these sub folders. The problem is that this checkbox is nowhere to be found on the maintenance cleanup task dialog box. We do have service pack 2 loaded and most of the updates but….?
I finally just got the T-SQL statement and created my own job.
This is the original statement:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18'
Is simply added a 1 to the end of the statement and made it:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18',1
This job runs great and deletes all the files on level below the top level folder. I did try adding a 2 to see if it would let me delete further levels but it errors out. Hope this helps somebody!
sqlMaintenance Cleanup task not functioning properly?
What part of this TSQL code does SQL Server 2005 Management Studio not understand?
EXECUTE master.dbo.xp_delete_file 0,N'\\pdxsql03\SQL Backup\POSSQL_Server',N'.bak',N'05/15/2006 08:09:37'
The database file backup extension is .bak and the file is older than one day which was specified.
It is just not deleting the file.
We have deleted the maintenance task and recreated it with no effect and this has been happening for over a month.
Any help here would be greatly appreciated.
Carl
carlt@.gicw.org
I've been having the same problem for over three months now and keep checking back here to see if there's been a fix....
|||http://blogs.msdn.com/sanchan/archive/2006/04/23/581640.aspx
This is addressed in SP1. Please look at the above blog for more information.
Gops Dwarak
|||The trick is to replace .bak with *.*
It definitely works. :-)
|||I tried to replace the extension "bak" with "*.*", "*" and ".*" I know this looks like the meeting of the disabled Smilie group, but you know what I mean. It definitely _DOESN′T_ delete any backups. However, when I execute the t-sql created by the maintenance Cleanup Task, it deletes the files.
Any suggestions?
|||Not working for me either. SP1 applied and all. Subdirectories for backups. .. trying to delete archived backups, in the form Filename.bak.7z. No worky worky!Please advise? (Read: How hard is it to implement a functioning XSP?!)|||
My solution was to take the T-SQL created by the cleanup task and modifying it slightly:
declare @.dt datetime
select @.dt=getdate()-5
EXECUTE master.dbo.xp_delete_file 0,N'E:\Backups',N'BAK',@.dt,1
The variable is used to check the age of the backup-files. In this case, all backups older than 5 days are deleted. The last Number (=1) gives the number of subdirectories to be searched in for .bak-files. AFAIK a maximum of 5 subdirs is supported.
Then you can take it and put it into an "execute SQL"-Task, take the package and schedule it or directly schedule it in the Job Scheduler of Management Studio as SQL-Statement
|||The workaround above may or may not work, depending on what the problem is.
To get to the bottom of the problem - what is the exact error that you are getting? We can then search if this is a known problem. There were number of issues with Cleanup task. A few were fixed in SP1, like Gops has mentioned, more were fixed in SP2 which is in the CTP release right now. If you can, please install SQL Server 2005 SP2 CTP December from here: http://www.microsoft.com/sql/ctp.mspx and let us know if the problem sitll exists.
Regards,
Maciek Sarnowicz
|||I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
Thanks,
-lance
|||There is an "off by one" bug using the time unit of measure in "Maintenance" and "Cleanup" tasks.
If you select "Weeks" you get "Days", with "Days" you get "Hours", and "Hours" blows the index.
The patching procedure is a little complicated. Read this:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
|||-lance wrote:
I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
You are running SQL Server 2005 Service Pack 2 (9.00.3054.00).
You are running Windows Server 2003 Service Pack 1.
Hope this clears up your confusion.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
|||
I was also having a similar issue. First the cleanup task would just not delete any files no matter where I pointed it to. I originally had put “.trn” in the file extension box. I then removed the . and everything deleted correctly. The problem we then ran into was that it would only delete from the top level folder that we pointed to. In another blog I read that I must check the Include first-level subfolders box to delete from these sub folders. The problem is that this checkbox is nowhere to be found on the maintenance cleanup task dialog box. We do have service pack 2 loaded and most of the updates but….?
I finally just got the T-SQL statement and created my own job.
This is the original statement:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18'
Is simply added a 1 to the end of the statement and made it:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18',1
This job runs great and deletes all the files on level below the top level folder. I did try adding a 2 to see if it would let me delete further levels but it errors out. Hope this helps somebody!
Maintenance Cleanup task not functioning properly?
What part of this TSQL code does SQL Server 2005 Management Studio not understand?
EXECUTE master.dbo.xp_delete_file 0,N'\\pdxsql03\SQL Backup\POSSQL_Server',N'.bak',N'05/15/2006 08:09:37'
The database file backup extension is .bak and the file is older than one day which was specified.
It is just not deleting the file.
We have deleted the maintenance task and recreated it with no effect and this has been happening for over a month.
Any help here would be greatly appreciated.
Carl
carlt@.gicw.org
I've been having the same problem for over three months now and keep checking back here to see if there's been a fix....
|||http://blogs.msdn.com/sanchan/archive/2006/04/23/581640.aspx
This is addressed in SP1. Please look at the above blog for more information.
Gops Dwarak
|||The trick is to replace .bak with *.*
It definitely works. :-)
|||I tried to replace the extension "bak" with "*.*", "*" and ".*" I know this looks like the meeting of the disabled Smilie group, but you know what I mean. It definitely _DOESN′T_ delete any backups. However, when I execute the t-sql created by the maintenance Cleanup Task, it deletes the files.
Any suggestions?
|||Not working for me either. SP1 applied and all. Subdirectories for backups. .. trying to delete archived backups, in the form Filename.bak.7z. No worky worky!Please advise? (Read: How hard is it to implement a functioning XSP?!)
|||
My solution was to take the T-SQL created by the cleanup task and modifying it slightly:
declare @.dt datetime
select @.dt=getdate()-5
EXECUTE master.dbo.xp_delete_file 0,N'E:\Backups',N'BAK',@.dt,1
The variable is used to check the age of the backup-files. In this case, all backups older than 5 days are deleted. The last Number (=1) gives the number of subdirectories to be searched in for .bak-files. AFAIK a maximum of 5 subdirs is supported.
Then you can take it and put it into an "execute SQL"-Task, take the package and schedule it or directly schedule it in the Job Scheduler of Management Studio as SQL-Statement
|||The workaround above may or may not work, depending on what the problem is.
To get to the bottom of the problem - what is the exact error that you are getting? We can then search if this is a known problem. There were number of issues with Cleanup task. A few were fixed in SP1, like Gops has mentioned, more were fixed in SP2 which is in the CTP release right now. If you can, please install SQL Server 2005 SP2 CTP December from here: http://www.microsoft.com/sql/ctp.mspx and let us know if the problem sitll exists.
Regards,
Maciek Sarnowicz
|||I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
Thanks,
-lance
|||There is an "off by one" bug using the time unit of measure in "Maintenance" and "Cleanup" tasks.
If you select "Weeks" you get "Days", with "Days" you get "Hours", and "Hours" blows the index.
The patching procedure is a little complicated. Read this:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
|||
-lance wrote:
I tried to load up SP2 (thought I had already) to test this with it...
well, I show I am running SP1 and though I tried to update I could not get everything to update. Either it had a newer version (according to the updater) or I was told that components must be updated together.
SELECT SERVERPROPERTY('ProductVersion') = 9.00.3054.00
select @.@.version = Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
So now the question is how do I even get it to upgrade to SP2?
You are running SQL Server 2005 Service Pack 2 (9.00.3054.00).
You are running Windows Server 2003 Service Pack 1.
Hope this clears up your confusion.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
|||
I was also having a similar issue. First the cleanup task would just not delete any files no matter where I pointed it to. I originally had put “.trn” in the file extension box. I then removed the . and everything deleted correctly. The problem we then ran into was that it would only delete from the top level folder that we pointed to. In another blog I read that I must check the Include first-level subfolders box to delete from these sub folders. The problem is that this checkbox is nowhere to be found on the maintenance cleanup task dialog box. We do have service pack 2 loaded and most of the updates but….?
I finally just got the T-SQL statement and created my own job.
This is the original statement:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18'
Is simply added a 1 to the end of the statement and made it:
EXECUTE master.dbo.xp_delete_file 0,N'D:\MSSQL\backup',N'trn',N'08/25/2007 13:49:18',1
This job runs great and deletes all the files on level below the top level folder. I did try adding a 2 to see if it would let me delete further levels but it errors out. Hope this helps somebody!
Maintenance Cleanup task NOT deleting files
What types of files are not being deleted? I've tested this with backup files (.bak), and it works. I vaguely remember another type of file does not get deleted. Please post more information and we'll figure out next steps.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
post the result of Select @.@.Version .... After release of SP2, MS has released some fixes for Matinenance Plan and if you have downloaded the SP2 before 05 mar ... then u need to apply those patches
Refer this link : http://support.microsoft.com/kb/933508
if the patch is already applied then the version should be : 9.0.3050.00
Madhu
|||Yes, we had downloaded SP2 before March 5th, but we saw the release of 2a and have applied it also. The version is , Microsoft SQL Server 2005 - 9.00.3050.00 (Intel X86) Mar 2 2007 20:01:28 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4).
I have also applied 2a to my workstation so my tools version should also be correct.
|||The file types are the maintenance plan output files, the .txt files. It's the default extension if you select 'maintenance plans files' in the clean up task. The version is Microsoft SQL Server 2005 - 9.00.3050.00 (Intel X86) Mar 2 2007 20:01:28 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4) .
Thanks for any help you can give me.
|||Mel100 wrote:
The file types are the maintenance plan output files, the .txt files.
As I suspected, this is a known issue that we could not fix in time for Service Pack 2. We ensured that .bak files are deleted properly, but the .txt files are not. See below for the associated Microsoft Connect item. If this scenario is important to you, please vote on it.
https://connect.microsoft.com/feedback/viewfeedback.aspx?FeedbackID=259390&wa=wsignin1.0&siteid=68
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
I have a Maintenance Cleanup task that is not deleting bak files. The server connection is valid, the account for the connection is a local admin and the owner of the agent job is a local admin. Local admins have full control to the folder where the files are. Also both accounts have the SA role. I have tried the folder name with a \ at the end and without. The job executes and completes successfully, it just doesn't remove bak files from the folder. I am on SP1 = Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Any assistance would be appreciated, thanks.
|||We have the same issue but not in SP2: ver:9.00.2047.00
The trn files are deleted, but the txt not !!
Wednesday, March 21, 2012
Maintenance cleanup task not deleting files
I have a maintenance cleanup task that is not actually deleting the files that it should be.
Here's the most recently task generated T-SQL statement:
EXECUTE master.dbo.xp_delete_file 0,N'F:\Program Files\Microsoft SQL Server\MSSQL\BACKUP',N'bak',N'12/05/2006 10:42:08'
The problem is that the files aren't actually being deleted when the job runs. However, if I create a new job with the statement as a single step or run it manually from a query window then the files are deleted as expected.
Is there anything I should be looking for? The job runs as 'sa' and I connect to the database engine using 'sa'... any ideas?
Thanks!Hi Davve,
Do you get an error message saying the the job has failed or does it appear to run successfully?
If its the latter is it possibly you can run sql profiler and run the job so we can help you further.
Pace
|||
Please file a defect report for this issue at http://connect.microsoft.com/sqlserver. We use issues reported by customers to prioritize future work including service packs.
What is the version number of SQL Server Management Studio you are running? You can check in the About... dialog shown by clicking the "Help | About..." menu item in SSMS.
Thanks,
Steve
Maintenance cleanup task not deleting files
I have a maintenance cleanup task that is not actually deleting the files that it should be.
Here's the most recently task generated T-SQL statement:
EXECUTE master.dbo.xp_delete_file 0,N'F:\Program Files\Microsoft SQL Server\MSSQL\BACKUP',N'bak',N'12/05/2006 10:42:08'
The problem is that the files aren't actually being deleted when the job runs. However, if I create a new job with the statement as a single step or run it manually from a query window then the files are deleted as expected.
Is there anything I should be looking for? The job runs as 'sa' and I connect to the database engine using 'sa'... any ideas?
Thanks!Hi Davve,
Do you get an error message saying the the job has failed or does it appear to run successfully?
If its the latter is it possibly you can run sql profiler and run the job so we can help you further.
Pace
|||
Please file a defect report for this issue at http://connect.microsoft.com/sqlserver. We use issues reported by customers to prioritize future work including service packs.
What is the version number of SQL Server Management Studio you are running? You can check in the About... dialog shown by clicking the "Help | About..." menu item in SSMS.
Thanks,
Steve
Maintenance Cleanup task NOT deleting files
What types of files are not being deleted? I've tested this with backup files (.bak), and it works. I vaguely remember another type of file does not get deleted. Please post more information and we'll figure out next steps.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
post the result of Select @.@.Version .... After release of SP2, MS has released some fixes for Matinenance Plan and if you have downloaded the SP2 before 05 mar ... then u need to apply those patches
Refer this link : http://support.microsoft.com/kb/933508
if the patch is already applied then the version should be : 9.0.3050.00
Madhu
|||Yes, we had downloaded SP2 before March 5th, but we saw the release of 2a and have applied it also. The version is , Microsoft SQL Server 2005 - 9.00.3050.00 (Intel X86) Mar 2 2007 20:01:28 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4).
I have also applied 2a to my workstation so my tools version should also be correct.
|||The file types are the maintenance plan output files, the .txt files. It's the default extension if you select 'maintenance plans files' in the clean up task. The version is Microsoft SQL Server 2005 - 9.00.3050.00 (Intel X86) Mar 2 2007 20:01:28 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4) .
Thanks for any help you can give me.
|||Mel100 wrote:
The file types are the maintenance plan output files, the .txt files.
As I suspected, this is a known issue that we could not fix in time for Service Pack 2. We ensured that .bak files are deleted properly, but the .txt files are not. See below for the associated Microsoft Connect item. If this scenario is important to you, please vote on it.
https://connect.microsoft.com/feedback/viewfeedback.aspx?FeedbackID=259390&wa=wsignin1.0&siteid=68
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
I have a Maintenance Cleanup task that is not deleting bak files. The server connection is valid, the account for the connection is a local admin and the owner of the agent job is a local admin. Local admins have full control to the folder where the files are. Also both accounts have the SA role. I have tried the folder name with a \ at the end and without. The job executes and completes successfully, it just doesn't remove bak files from the folder. I am on SP1 = Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Any assistance would be appreciated, thanks.
|||We have the same issue but not in SP2: ver:9.00.2047.00
The trn files are deleted, but the txt not !!
Maintenance Cleanup task NOT deleting files
What types of files are not being deleted? I've tested this with backup files (.bak), and it works. I vaguely remember another type of file does not get deleted. Please post more information and we'll figure out next steps.
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
post the result of Select @.@.Version .... After release of SP2, MS has released some fixes for Matinenance Plan and if you have downloaded the SP2 before 05 mar ... then u need to apply those patches
Refer this link : http://support.microsoft.com/kb/933508
if the patch is already applied then the version should be : 9.0.3050.00
Madhu
|||Yes, we had downloaded SP2 before March 5th, but we saw the release of 2a and have applied it also. The version is , Microsoft SQL Server 2005 - 9.00.3050.00 (Intel X86) Mar 2 2007 20:01:28 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4).
I have also applied 2a to my workstation so my tools version should also be correct.
|||The file types are the maintenance plan output files, the .txt files. It's the default extension if you select 'maintenance plans files' in the clean up task. The version is Microsoft SQL Server 2005 - 9.00.3050.00 (Intel X86) Mar 2 2007 20:01:28 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 4) .
Thanks for any help you can give me.
|||Mel100 wrote:
The file types are the maintenance plan output files, the .txt files.
As I suspected, this is a known issue that we could not fix in time for Service Pack 2. We ensured that .bak files are deleted properly, but the .txt files are not. See below for the associated Microsoft Connect item. If this scenario is important to you, please vote on it.
https://connect.microsoft.com/feedback/viewfeedback.aspx?FeedbackID=259390&wa=wsignin1.0&siteid=68
Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/
I have a Maintenance Cleanup task that is not deleting bak files. The server connection is valid, the account for the connection is a local admin and the owner of the agent job is a local admin. Local admins have full control to the folder where the files are. Also both accounts have the SA role. I have tried the folder name with a \ at the end and without. The job executes and completes successfully, it just doesn't remove bak files from the folder. I am on SP1 = Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Any assistance would be appreciated, thanks.
|||We have the same issue but not in SP2: ver:9.00.2047.00
The trn files are deleted, but the txt not !!