SQL Server Maintenance

This help file applies to an out-of-date version of MainBoss.
The most recent version of MainBoss is MainBoss 4.2.4.
This help file does not exist in MainBoss 4.2.4, but the index for that version can be found here.

< Previous section  |  Table of Contents  |  Index  |  Next section >

From time to time, you should clean-up your SQL Server database. Clean-up operations can include reorganizing the database index, rebuilding the index from scratch, and various other actions.

If you have a full SQL Server (as opposed to SQL Server Express), you can arrange clean-up operations through SQL Server Management Studio. To do so, follow these steps:

  1. Login to an account with Windows Administrator privileges.
  2. Start SQL Server Management Studio. (On Windows 7 and Vista, you should use Run as Administrator.)
  3. In the left-hand panel, expand the entry for Management.
  4. Right-click the entry for Maintenance Plans, and click Maintenance Plan Wizard.

The wizard will then walk you through the process of creating a maintenance plan that performs various operations automatically. During the process, you can choose what operations will be performed. As a minimum, we recommend the following:

Check Database Integrity
Reorganize Index
Rebuild Index
Clean Up History
Maintenance Cleanup Task

(You can also include a backup operation, although you should already be backing up your database with a different maintenance plan—you don't need to clean your database as often as you need to back it up.)

Once you've used the wizard to create the maintenance plan, you can execute the operations by right-clicking the entry for the maintenance plan, then clicking Execute.

If you ever have a system crash or power failure on the server computer, you should make a point of cleaning up your database as soon as possible afterward.

If you have SQL Express, the associated Management Studio does not allow you to make maintenance plans. However, you can perform similar clean-up maintenance operations using the expressmaint software discussed in SQL Express Considerations. For more information on cleaning up the database, see the expressmaint documentation.

< Previous section  |  Table of Contents  |  Index  |  Next section >