Understanding the Inventory Removal Service

The Inventory Removal service is a manual service that runs on the Inventory server. You can remove the unwanted, redundant, or obsolete inventoried servers from the Inventory database using the Inventory Removal service. The Inventory Removal service removes the inventoried servers from the Inventory database through using the inventoryremovallist.txt file. To understand the Inventory Removal Service synchronization, see Using the Inventory Removal Service for Synchronization.

The inventoryremovallist.txt file contains a list of inventoried servers that have to be removed from the Inventory database.

IMPORTANT:   You can run the Inventory Removal service on the Intermediate Server only if the Intermediate Server has either inventoried servers or database attached to it.

To remove the inventoried servers from the Inventory database:

  1. Using a text editor, create a file with the name inventoryremovallist.txt with the following contents:

    ;                     Enter comments, if any
    DN or name of the inventoried server (as stored in the Inventory database) to be removed from the Inventory database 
    DN or name of the inventoried server (as stored in the Inventory database) to be removed from the Inventory database
    ...
    ...
    DN or name of the inventoried server (as stored in the Inventory database) to be removed from the Inventory database

    A sample file is as follows:

    CN=INT-SERVER-NDS.OU=Leaf.O=XYZ.T=XYZ-TREEzen-server.xyz.com 
    CN=ROOT-SERVER-NDS.O=XYZ.T=XYZ-TREE

    To generate the list of inventoried servers that must be removed you can either perform a query on a selected criteria or manually enter the names of the inventoried servers. For more information on Query, see Forming the Query and Setting the Filter Conditions.

  2. Copy the inventoryremovallist.txt file to the ZENworks_installation_path\zenworks\inv\server\wminv\properties directory.

  3. In the ZENworks_installation_path\zenworks\inv\server\wminv\properties\
    inventoryremoval.properties file, ensure that the value of FilePath is the location of inventoryremovallist.txt (specified in Step 2).

    NOTE:  Ensure that the path separator is a forward slash ( / ) and not a backslash ( \ ).

  4. At the server console prompt, enter StartSer RemoveInventory to start the Inventory Removal service.

The processing done by Inventory Removal service is as follows:

  1. The Inventory Removal service reads each line of the inventoryremovallist.txt file and creates a delete str file for each inventoried server that is listed in the inventoryremovallist.txt file.

    The delete str file is saved in the scandir directory if the Selector is running, else it will be placed in the dbdir or entmergedir directories depending on the Inventory server role.

  2. The Selector validates the delete str file and copies it into the dbdir and entmergedir directories.

  3. The Storer reads the delete str file from dbdir and deletes the inventoried server from the attached Inventory database.

  4. If the inventory deployment rolls up scan data, the delete str is also rolled up to the next level Inventory server.

    The inventoried server is deleted from the Inventory database at all Inventory servers deployed at the enterprise level.


Using the Inventory Removal Service for Synchronization

The Inventory Removal Service automatically removes inventoried servers from the Inventory database when the corresponding server objects are removed from eDirectory.

Sometimes it is possible that the inventoried servers in eDirectory and in the Inventory database are not synchronized because of one or both of the following reasons:

If this happened, you can use the Inventory Removal Service to remove unwanted inventoried servers from the Inventory database so the database is once again synchronized with eDirectory.

If you know the fully qualified DN names of the inventoried servers, you can specify the DN names of these servers in the inventoryremovallist.txt file.

To find the server objects that were removed from eDirectory:

  1. Export the list of server objects attached to the given Inventory server using an eDirectory tool like NDSREPAIR. The eDirectory tools can be downloaded from the Cool Solutions Web site.
  2. To export all the server objects into a .csv file, use the Data Export Wizard.

    NOTE:  While exporting all the inventoried servers to a .csv files, it is necessary to select the attributes.

    The exported .csv file will contain the DNS name and the selected attributes of the inventoried servers. However, you must remove attribute values and the double-quote characters from the .csv file.

  3. Compare the eDirectory exported file and the .csv file using the file comparison utility to identify the inventoried servers that do not match the .csv file.

    NOTE:  The eDirectory output file and the .csv file should be in the same format for the comparison to succeed.

  4. After identifying the inventoried servers that are not synchronized, place the DN names of these servers in the inventoryremovallist.txt file for the Inventory Removal Service to pick them up.