When running the CMDB task "Assign Computer's Ownership to be the Primary User", this fails to work or assign the Asset Owner correctly to a computer resource due to issues with the Primary User.
There are many areas that this task can fail at. The following troubleshoots issues associated with the Primary User.
The computer doesn't have a Primary User.
a. In the Symantec Management Platform Console, click on the Manage button > Assets. b. Click to expand Manage Configuration Items > Computers and Peripherals and then click on Computer. c. Locate and right click on a computer to check and then click on Resource Manager. d. In the General section, verify that the "Primary account" is populated with a user, as shown in Figure 1. If there is no user listed, this can indicate that the computer is unmanaged (it has no Agent) or that it does have an Agent but isn't reporting basic inventory. Perform troubleshooting with the computer's Agent to ensure that this is working correctly before continuing.
Figure 1: The Primary User of a computer from Resource Manager
The computer has a Primary User specified in Resource Manager but this isn't for the current month. Note: Even though a computer may show that it has a Primary User (as from Figure 1), this does not indicate that it is the current Primary User for the current month. This is required to be set for the task to succeed.
a. In Microsoft SQL Server Management Studio, run the following query to find a computer's GUID to check:
USE Symantec_CMDB SELECT * FROM vComputer ORDER BY Name -- Locate a computer to check and copy its GUID value to use with the next query.
b. Run the next query using the GUID found in the first query:
USE Symantec_CMDB SELECT * FROM Inv_AeX_AC_Primary_User WHERE _ResourceGuid = '<GUID>' -- Change <GUID> to be the GUID found in the first query.
c. Review the results by checking the Month, User, Domain and Year values. The Month must be the current month and the Year must be the current year. If either are incorrect or blank, the computer's Agent isn't reporting basic inventory. Perform troubleshooting with the computer's Agent to ensure that this is working correctly before continuing.
The Primary User does not have a matching User record in the Symantec Management Platform or their NT ID (Domain\UserID) does not match.
a. In the Symantec Management Platform Console, click on the Manage button > Assets. b. Click to expand Organizational Types and then click on User. c. Locate a User to check. If the User from Steps 1 and 2 is not found, this is why the task is failing. Create a matching User with the correct Domain and UserID. If, however, the User exists, next check their Domain and UserID. If these are incorrect, the User can be attempted to be edited to manually change the Domain and UserID. If this fails, another User record is using these values. Correct the discrepancy with the User records before continuing.
If no errors appear in the Altiris logs when the task runs, this generally indicates that criteria for the task to work was not met. Ensure that all criteria was checked.
Can an Asset Owner be set manually to a computer? If not, this indicates a more fundamental issue with the association.
Verify in SQL if the Asset Owner association is being made, whether by the task or manual changes. For example:
USE Symantec_CMDB SELECT * FROM Inv_Ownership_Details
The resulting _ResourceGuid field is the computer's GUID (such as found in vComputer) and Owner field is the user's GUID (as found in vUser or vItem). These will match up to the applicable computers and users if the Asset Owner association has been successfully made. Note: If there are no or few records found, this can be an indication that the Assign Computer's Ownership to be the Primary User task has not worked successfully in the past as otherwise there should be many computers listed here.
Similarly, the ResourceAssociation table can be checked too:
USE Symantec_CMDB SELECT * FROM ResourceAssociation
The resulting ParentResourceGuid is the computer's GUID and the ChildResourceGuid is the user's GUID.
Verify that [Month] value reported by basic inventory matches the value of current month in SQL:
USE Symantec_CMDB SELECT [Month] FROM Inv_AeX_AC_Primary_User WHERE _ResourceGuid = 'Guid_of_client_machine'
USE Symantec_CMDB SELECT DATENAME(MONTH,getdate())
Month values reported by two queries should be the same. If there are any differences, for example, first query returns 'November' and second 'novembre', check your SQL Server collation. For the list of supported collations refer to the following article:
Verify that the stored procedure spGetComputer_PrimaryUser returns expected values.
1. In the Symantec Management Platform Console, click on Manage > Filters. 2. Find the filter being used by the task. 3. Right click on the filter name and click on Properties. 4. Copy the Guid ID. 5. In SQL, run the following:
USE Symantec_CMDB EXEC spGetComputer_PrimaryOwner @includeCollectionGuid='<GUID>' -- Where '<GUID>' is the filter's GUID from Step 4.
6. Run the script. The results are what computers would have asset owners assigned to them. Are there any results? If not, then none of the computers in the filter qualify most likely because of one of the above criteria was not met. Note: There should only be one user per computer. If more than one user appears as the primary user for the same computer, this can result in an object reference error. Refer to the following article for information on how to resolve this: