Tuesday 6 January 2009

Multiple instances of the same filename, but different file path are not reported by Inventory Solution for Windows in Altiris Notification Server

KB 35400

Problem/Symptoms

A Software Inventory scan using AeXAuditPls.exe does not report multiple instances of the same file. The Windows* operating system allows files to be named the same as long as they are in separate folders. As determined by inspecting the auditpls.nsi file on a client computer, files with the same name but different file paths are collected properly by AeXAuditPls.exe and sent to the Notification Server. However, only one of these files is added to the AeX SW Audit Software data class.


Environment

Inventory Solution for Windows 6.1 SP2 (6.1.1075) and all previous versions


Cause

The Notification Server dataloader uses the following properties to determine a unique row to be placed into the AeX SW Audit Software data class (Inv_AeX_SW_Audit_Software_spt and Cmn_SW_Common tables in the database):

  • Manufacturer
  • Product Name
  • Product Version
  • Language
  • File Name
  • File Size
  • InternalName
  • File Description

The dataloader will ignore multiple instances of files that match on these properties. Note that "File Path" in not used to determine uniqueness, which is why only one instance of a file that occurs in multiple folders is inserted into the database.

Also note that since "File Size" is used to determine uniqueness, data files (and executable files) with the same name, but with different sizes, will be inserted into the database. On the odd chance that data files with the same name contain different data, but have the same exact size, only one file will be inserted into the database.


Resolution

This resolution is provided "as is" and has not been reviewed by the developers of Inventory Solution for Windows. It may not be suitable for every environment.

Important: Because this resolution updates the data in the database, back up the Altiris database first.

A change to the DataClassAttribute Table will cause the Data Loader to use "File Path" to determine unique rows to insert into the database. The following SQL query will show the attributes the Data Loader uses to determine uniqueness.

USE Altiris
SELECT * FROM DataClassAttribute
WHERE InvClassId = (SELECT id FROM DataClass WHERE Name = 'AeX SW Audit Software')
ORDER BY AttrId

You can use this SQL statement to change the "File Path" attribute so it is used to determine uniqueness.

USE Altiris
UPDATE DataClassAttribute
SET KeyIndex = AttrId, Nullable = 0
WHERE AttrName = 'File Path'
AND InvClassId = (SELECT id FROM DataClass WHERE Name = 'AeX SW Audit Software')

Note: This change may be overwritten if a upgrade or repair is made to Inventory Solution for Windows.

No comments: