Default Log Log error: 'Cannot insert the value NULL into column 'MaintenanceStatus', table 'tempdb. (NETIQKB55470)

  • 7755470
  • 02-Feb-2007
  • 07-Jan-2011

Environment

NetIQ AppManager 6.x
NetIQ AppManager 7.0.x

Situation

Reporting Knowledge Script stays in a Pending state
Default Log Log error: 'Cannot insert the value NULL into column 'MaintenanceStatus', table 'tempdb.dbo.#MaintAdhoc_________________________________________________________________________________________________________00010000324C'; column does not allow nulls. INSERT fails.'

Resolution

You can manually remove the NULL values for future reports to complete.  Ensure you have a full database backup of your AM Repository (QDB by default) prior to executing any query.

To remove the NULL values from your MachineMntHistory table:

The "object" referred to in the message is usually a temporary cursor used in the query results.  The message occurs if the result set is closed or the cursor is reallocated before the process is done utilizing the record set, or if the record set is empty.

See if the MachineMntHistory table has any NULL values in the Operation column.  There should NEVER be a NULL in this column. 

select MCMachineName, suser_sname(UserID),Operation,LogTime, MntType, MntLevel from MachineMntHistory order by MCMachineName,LogTime

If you DO see these in your environment, please export and send a copy of the contents of the MachineMntTable, from the query provided above.  Once that's done, these rows can be deleted with the following:

Delete MachineMntHistory where Operation is NULL

Cause

The MaintenanceHistory table has been populated with NULL values

Additional Information

Formerly known as NETIQKB55470