Previous Section
 < Day Day Up > 
Next Section


Updating Collections

As we’ve seen, collections that are based on direct-membership rules need to be maintained by the SMS administrator since they’re manually created and defined. Collections that are based on queries, however, can be updated automatically based on the schedule that you define. The SMS component responsible for carrying out this updating task is Collection Evaluator.

Collection Evaluator will execute the query and update the collection whenever the scheduled interval occurs or when the SMS administrator forces an update through the SMS Administrator Console. When the SMS administrator forces an update or modifies a collection, creates a new collection, or deletes an existing collection, SQL Monitor notifies Collection Evaluator of the event.

Forcing an Update

Collection Evaluator will execute a collection’s query and update the collection membership according to whatever schedule you define. However, sometimes you need or want to update the collection membership outside of that schedule. The SMS administrator can force Collection Evaluator to update all the collections or any individual collection at any point in time.

Updating All Collections

To update all the collections at once, follow these steps:

  1. Navigate to the Collections folder in the SMS Administrator Console and expand it.

  2. Right-click the Collections folder, choose All Tasks from the context menu, and then choose Update Collection Membership.

  3. A message box will appear confirming the update of all collections. Choose OK. This update might take some time to complete depending on the number of collections, network traffic if the SMS database is on another computer, and so on.

  4. When the update is complete, all the collections in the SMS Administrator Console will show an hourglass alongside the collection icon in the SMS Administrator Console, as shown in Figure 11.17. These hourglasses indicate that the collection was updated, but that the SMS Administrator Console window needs to be refreshed.

    Click To expand
    Figure 11.17: The SMS Administrator Console with updated collections before being refreshed.

  5. To refresh the SMS Administrator Console window, right-click the Collections folder again and choose Refresh from the context menu. The collections will now display their updated memberships.

Updating an Individual Collection

To update an individual collection, follow these steps:

  1. Navigate to the Collections folder in the SMS Administrator Console and expand it.

  2. Right-click the collection you want to update, choose All Tasks from the context menu, and then choose Update Collection Membership.

  3. As shown in Figure 11.18, a message box appears confirming the update of this collection and giving you the option of simultaneously updating the collection’s subcollections. If you want the subcollections updated as well, select the Update Subcollection Membership check box. Click OK to begin the update.

    Click To expand
    Figure 11.18: Message box confirming the collection update.

  4. When the update is complete, the collection in the SMS Administrator Console will show an hourglass icon alongside the collection entry. This indicates that the collection was updated but that you still need to refresh the SMS Administrator Console.

  5. To refresh the SMS Administrator Console window, right-click the collection again and choose Refresh from the context menu. The collection will then display its updated membership.

Deleting a Collection

That which the SMS administrator gives, the SMS administrator can take away. This, of course, is true of collections. While you maintain collections, you might need to reorganize your collection structure by creating new collections and deleting existing ones. Deleting a collection can have consequences other than just removing that collection. When you delete a collection, you’ll also effect the following events:

  • Any advertisements that have targeted only this collection will also be deleted. (If an advertisement is also targeting another collection, it won’t be affected.)

  • When you create a query, you can limit its scope by associating it with a particular collection. When the collection is deleted, the query’s scope is no longer limited.

  • Any collections whose membership rules (queries) are limited to the collection that’s being deleted will still process the rule but will display no resources.

  • Through the object class or instance security (discussed in Chapter 16) you can identify which SMS administrators have the ability to view the membership of each collection. After you remove a collection, the administrators you identified will no longer be able to view that collection’s resources if the resources aren’t in other collections that the administrators can view.

    Note 

    If the collection you’re deleting has a subcollection linked to it, that subcollection is also deleted unless the subcollection itself has its own subcollections. If the latter is true, when you delete the top-level collection, the subcollection isn’t deleted and will still exist in the collection tree.

Fortunately, when you delete a collection, the Delete Collection Wizard warns you of these effects and shows you what properties of the collection might be affected.

Note 

When you right-click a collection, you see an option called Delete Special. Be careful when using this option. It bypasses the Delete Collection Wizard and simply deletes all the resources from the collection from the SMS database, along with the resources’ discovery and inventory information. Consequently you could inadvertently delete resources from the SMS database.

Follow these steps to delete a collection:

  1. Navigate to the Collections folder in the SMS Administrator Console and expand it.

  2. Right-click the collection you want to delete and choose Delete from the context menu. The Delete Collection Wizard Welcome page is displayed, as shown previously in Figure 11.15. Verify the name of the collection to be deleted.

  3. Click Next to display the Effects Of Deleting This Collection page, shown in Figure 11.19. This page warns you about the effects of deleting a collection and lets you choose whether to display details about the effects.

    Click To expand
    Figure 11.19: The Effects Of Deleting This Collection page.

  4. Select the Yes option to view individual pages describing what will be affected by the deletion. Select the No option to proceed with the deletion.

    If you selected the No option, you’d proceed to step 11, where you would simply delete the collection. For this example, select the Yes option.

  5. Click Next to display the Subcollections page, as shown in Figure 11.20. This page displays a list of this collection’s subcollections. Note the warning that deleting this collection will also delete the subcollections.

    Click To expand
    Figure 11.20: The Subcollections page.

  6. Click Next to display the Advertisements page, as shown in Figure 11.21, which displays a list of all the advertisements that have targeted this collection. Again, note the warning that deleting this collection could also delete the advertisements (if they’re not also targeted to another collection).

    Click To expand
    Figure 11.21: The Advertisements page.

  7. Click Next to display the Queries page, shown in Figure 11.22, which lists any queries that have been limited to this collection. A similar warning message is provided.

    Click To expand
    Figure 11.22: The Queries page.

  8. Click Next to display the Collection Membership Rules page, shown in Figure 11.23. This page displays a list of collections whose membership rules are limited to this collection and warns of possible effects.

    Click To expand
    Figure 11.23: The Collection Membership Rules page.

  9. Click Next to display the Administrators page, shown in Figure 11.24, which lists the administrators who have permissions to view resources in this collection and the effect that the deletion might have on them.

    Click To expand
    Figure 11.24: The Administrators page.

  10. Click Next to display the Choose Whether To Delete This Collection page, shown in Figure 11.25. This final confirmation page asks whether you want to proceed with the deletion. Select the Yes option to continue.

    Click To expand
    Figure 11.25: The Choose Whether To Delete This Collection page.

  11. Click Next to display the Completing The Delete Collection Wizard page, shown in Figure 11.26. Click Finish to delete the collection.

    Click To expand
    Figure 11.26: The Completing The Delete Collection Wizard page.

In this section we’ve seen SMS administrators update and maintain collections and subcollections. Next, let’s discuss how SMS itself can update your collections automatically.

Collection Evaluator Update Process Flow

Collection Evaluator assigns resources to collections according to the most recent data about the resources. Collection Evaluator waits for a file change notification from SQL Monitor before the update process starts. As shown in Figure 11.27, SQL Monitor writes a wake-up file to Collection Evaluator’s inbox (SMS\Inboxes\Colleval.box). SQL Monitor writes an update collection (.UDC) file when the update is forced or a collection is modified, an add collection (.ADC) file when a new collection is created, and a delete collection (.DC) file when a collection is deleted. SQL Monitor, like so many other components in SMS 2003, is driven by SQL trigger events that cause the component ultimately to wake up and perform its task. Collection Evaluator then executes the query and updates the membership results in the SMS database.

Click To expand
Figure 11.27: The Collection Evaluator update process flow.

If the SMS site has child sites, Collection Evaluator also creates a .PSD file that contains the collection definition and membership. It writes this file to Replication Manager’s inbox (SMS\Inboxes\Replmgr.box) so that the file can be scheduled and copied to Collection Evaluator’s inbox on the child site. If the child site is a secondary site, the file is rewritten to disk as a .CLF file and contains only the collection memberships. If the child site is a primary site, the collection will be processed in much the same fashion as described in the beginning of this section.

When a child site changes its parent site affiliation, Collection Evaluator is responsible for removing any collections that the parent created (and are therefore locked at the child site). When the child site joins the new parent site, the collections created at the parent site are passed down to the child site, and Collection Evaluator locks them and keeps them updated.

Status Messages

As with all SMS components, Collection Evaluator generates status messages as it processes collections and subcollections, as well as a log file if you’ve enabled logging for this component. The Status Message Viewer window shown in Figure 11.28 displays typical status messages generated by Collection Evaluator. Notice that this component’s message IDs lie within the 25xx range. For example, message ID 2516 indicates that Collection Evaluator was notified that a new collection was added (by the SMS administrator, of course). The .ADC file is a wake-up file written by SQL Monitor.

Click To expand
Figure 11.28: Status messages generated by Collection Evaluator as it processes SMS collections.

The pairing of messages 2539 and 2510 indicates when the membership rules for a collection were processed and when the collection was updated. A 2508 message indicates that Collection Evaluator is set to replicate the site’s collections and subcollections to child sites.

In addition to these status messages, Collection Evaluator writes its thread activity to a log file named Colleval.log if you enabled logging for this component. Figure 11.29 displays log entries as viewed using Microsoft Notepad. As you can see, there’s really nothing remarkable here, except that you can view on a per-thread basis when Collection Evaluator processes each collection, updates or deletes wake-up files, and so on.

Click To expand
Figure 11.29: Log entries generated by Collection Evaluator during normal processing.


Previous Section
 < Day Day Up > 
Next Section