Quantcast
Channel: SQL Server Manageability forum
Viewing all articles
Browse latest Browse all 1519

Maintenance Clanup Task - fails - SQL Server 2008 R2 (sp1) to delete BAK on C:\Archive 14 days old

$
0
0

Please Review and inform me if anything else should be included: 

After searching all the links, wanted to post my lessons learned.

SQL Server 2008 R2 SP1      On the C:\ created a folder named Archive     C:\Archive   Check properties for read/write

In SSMS - Management - Maintenance Plans - choose New Maintenance Plan - Give it a short meaningful name

In the toolbox - choose Maintenance Cleanup Task - this will appear as Subplan_1  On the box below right click the graphical box for Edit

in the Folder enter   C:\Archives\      (other post show the last backslash is necessary)

in File Extensions enter BAK (other post show upper case is necessary, do not put the dot (period) in front)

Click Include first-level subfolders (some post indicate that this may be necessary, mine worked with it checked)

Close the maintence plan right panel - Save changes to the following items?  Yes

Now, on the SQL Server Agent - Jobs refresh the Jobs if the new MaintenancePlan.subplan_1 does not show up.

Right click on the new Job - Properties - On the Owner - change the owner to sa     Otherwise the job can't reach outside to the C:\Archive folder

To test - go back to Management - Maintenance Plans - right click on the maintenance plan and click Execute

If this fails, go to the Error Logs - current and read the verbose error message. If the Active Directory rights are not correct or if the SA was not added to the JOB and error such asSQL Server Error 15404 when trying to run a Maintenance Plan is a good search to start with.

If successful, it can now be scheduled for a nightly or weekly task.

After reading all the links, each had a small part of the solution. This is probably the best step-by-step for someone such as an MSACCESS user who visits SQL Server once a day outside the tables, views, and SP. So many throw one tibit of information at a time..


Rx

Please note: the 200 TB WONR chip is being expanced to 300 TB soon.  WONR (Write Once Never Read) thanks to popular demand


Viewing all articles
Browse latest Browse all 1519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>