Database Maintenance
________________________________________

Overtime, your database can accumulate "white space" that MS SQL Server does not give back. This leads to "fragmentation" and unnecessary use of disk space. To get this space back and to "tune" the database, we recommend running RWMaint on a regular basis.

You can take advantage of the Windows Task Scheduler that is included with the Windows Operating System to perform this maintenance. Scheduled Tasks allows you to run programs automatically, and at regular intervals. Below are the step by step instructions for configuring the Windows Task Scheduler to run the database maintenance program automatically.

This task is only to be scheduled for the Server. Make sure and leave your computer on as well, so the task can run. (***NOTE*** in the Advanced options of your Scheduled Task, you can set the task to "wake" the computer from Standby).

01. Click on Start
02. Click on Settings
03. Click on Control Panel
04. Double click on the Scheduled Task Icon
05. Double click on Add Scheduled Task
06. Click on Next
07. Click on the Browse Button
08. Click on the "Look In" drop-down menu and select Local Disk (C:\)
09. Double click on the RWD folder
10. Double click on RWMaint.exe program
11. Select when you would like to "Perform this Task" (Daily)
12. Click Next
13. Under "Perform This Task", choose Everyday
14. Click Next
15. Enter your COMPUTER LOGIN NAME
16. Enter your Password (***NOTE*** you must have a Windows password setup on your computer for the Task Scheduler to work.)
17. Confirm your password
18. Click on Next
19. Put a check mark next to "Open advanced properties for this task when I click Finish"
20. Click Finish
21. Click on the Schedule tab
22. Click Advanced
23. Put a check mark next to "Repeat Task"
24. Set the task to run every "24 hours"
25. Click to select the little circle next "Duration" and set it to run for 24 hours and 0 minutes
26. Put a check mark next to "If the task is still running, stop it at this time"
27. Click OK
28. Click Apply
29. Click OK

This utility also makes a backup of the database before executing its maintenance routine. These backups are stored in C:\RWD\Backup\ and are named RWD1.ZIP, RWD2.ZIP, etc., all the way up to RWD7.ZIP. So technically, this utility servers two purposes - database maintenance and a redundant backup.

Keywords: rwmaint, rwmaint.exe, database, utility, automated, maintenance, performance, shrink, compress