Trying to run the CMDB task "Assign Asset Owner to be the Primary User" fails to work. Reviewing the Altiris logs, the error "Object reference is not set to an instance of an object" is found during the task run.
Object reference is not set to an instance of an object.
There are more than one primary users set to the ownership of a computer. The other users are no longer in the database and attempting to edit them via their GUID also results in an object reference error.
It is unknown now this may normally happen and Symantec has not been able to reproduce the issue.
Modify the stored procedure "spGetComputer_PrimaryOwner" used by the CMDB task to perform additional checks. This will only use the valid user seen as the primary user and resolve the error, enabling the task to then successfully work.
A sample of a modified "spGetComputer_PrimaryOwner" stored procedure and the original are attached to this article. In SQL Server Management Studio, run the spget-new.sql. This will update the stored procedure. Then in the Symantec Management Platform, run the task again. This should work this time. To run the stored procedure, do the following:
Copy the code from spget-new.sql into SQL Server Management Studio.
Use the Symantec_CMDB database to run the code against.
Execute the code. The stored procedure is then modified and ready.