tailieunhanh - Brad’s Sure Guide to SQL Server Maintenance Plans- P23

Brad’s Sure Guide to SQL Server Maintenance Plans- P23: SQL Server has a reputation as being a simple database application to install, configure, and maintain. This is a little misleading. SQL Server is a powerful relational database that can handle the needs of the largest organizations and, as such, its proper maintenance almost certainly requires the attention of an experienced DBA. | Chapter 7 Rebuild Index Task For this example we are going to keep things simple so let s assume we want to perform the Rebuild Index task for all user databases. In this case choose the option shown in Figure and then click OK. Figure To keep things simple select the All user databases option. The Define Rebuild Index Task screen reappears and the two drop-down boxes 1 referred to earlier are displayed below the Databases drop-down box but they are grayed out as shown in Figure . Define Rebuild Index Task Configure the maintenance task. Databases Object Selection Figure The Object and Selection drop down boxes are not available. 111 Chapter 7 Rebuild Index Task So what s going on Why are these two options grayed out The reason is that these two options are only available if you select one database on which to run the Rebuild Index task. Since we selected All user databases they are not available. Selecting a Specific Database Although it does not apply to our example let s take a look at what happens if you select only a single database such as AdventureWorks for the task. To do this select These databases from the screen shown in Figure and then check the checkbox for AdventureWorks. When you click OK this section of the Define Rebuild Index Task screen will look as shown in Figure . Figure When a single database is selected then the Object drop-down box becomes available. Notice that Specific databases now appears in the Databases drop-down box the Object box is now available and the Selection box is still for the time being grayed out. What the Object and Selection options allow you to do is to selectively rebuild some of the indexes in your database and not others. If you click on the Object drop-down box you ll see the choices as shown in Figure . Figure You must select either Table or View. Notice that there are three choices for Object. If you leave the default option selected Tables and views then the Rebuild Index task .