September 3, 2010 at 8:48 am
Hi,
I have a maintenance plan in SSMS which has 2 steps:
1. Backing up a database on other server.(backup database task)
2. Deleting the older backup files.(maintenance clean up task)
The job runs fine everyday with the bak file in its place but
the older backup files does not delete automatically
I have to do it manually everyday.
What is the problem?
Regards,
Sushant
Regards
Sushant Kumar
MCTS,MCP
September 3, 2010 at 11:03 am
Depending on version, you need to specify the extension to delete as BAK not .BAK
I think this was fixed in a service pack if I remember correctly.
September 3, 2010 at 11:13 am
Are you post SP2 + SPs? There were some fixes for plans.
What are your deletion settings?
September 3, 2010 at 11:28 am
The version is windows server 2003 with sp2
the file extension i mentioned is bak
Windows server 2003 with sp2
The delete settings are :-
Delete files with extension bak and older than 1 day
the folder is specified at same location as the backup location.
Regards,
Sushant
Regards
Sushant Kumar
MCTS,MCP
September 3, 2010 at 11:43 am
what version of SQL Sever?
Can you perform "Select serverproperty('productlevel')
September 3, 2010 at 12:53 pm
@ nj- dba
Its
9.00.4053.00 SP3 Standard edition
Regards
Sushant Kumar
MCTS,MCP
September 3, 2010 at 1:06 pm
Could you check for any errors in the MP logs.
Thank You,
Best Regards,
SQLBuddy
September 3, 2010 at 1:30 pm
Maintenance Plan Logs ... check this folder
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG
Thank You,
Best Regards,
SQLBuddy
September 3, 2010 at 1:46 pm
The output is :
NEW COMPONENT OUTPUT
Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.4053
Report was generated on "server name".
Maintenance Plan: job_name@10pm
Duration: 00:00:00
Status: Succeeded.
Details:
Regards,
Sushant
Regards
Sushant Kumar
MCTS,MCP
September 3, 2010 at 2:13 pm
You don't find any errors in that Log?
Then check whether the agent has access to that backup directory?
Thank You,
Best Regards,
SQLBuddy
September 3, 2010 at 2:29 pm
@ sql buddy
If the agent didn't had access to the backup directory, then how could the backup be placed everyday?.... correct me if iam wrong
The backup happens everyday but the deleting part doesn't happen.Thts strange indeed.
Its like 2 parts of a job where 1st part is completed everyday and the other part is incomplete everyday and still the job is successful.
Regards,
Sushant
Regards
Sushant Kumar
MCTS,MCP
September 3, 2010 at 3:39 pm
Right. Do you have the backups of these dbs going into individual folders ?
Thank You,
Best Regards,
Varma
September 3, 2010 at 4:27 pm
That's the agent log, isn't it? You want to get something from the maintenance plan itself, not the job. Something like this:
Maintenance Cleanup Task (SEVENFALLS)
Maintenance Cleanup on Local server connection
Cleanup Database Backup files
Age: Older than 1 Days
Task start: 2010-09-03T16:24:48.
Task end: 2010-09-03T16:24:49.
Success
Command:EXECUTE master.dbo.xp_delete_file 0,N''C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Backup'',N'''',N''2010-09-02T16:24:48''
You can configure logging in the plan. In there, set it to log to a text file.
September 3, 2010 at 5:05 pm
In your maintenance plan, how are the two tasks connected?
And, verify that you have configured the maintenance cleanup task with the correct directory and extension. As was previously mentioned - the extension cannot be .BAK - in other words, if you have the period in their it won't work.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
Viewing 15 posts - 1 through 15 (of 44 total)
You must be logged in to reply to this topic. Login to reply