Software Licensing View does not match Licensing in the Asset Report
search cancel

Software Licensing View does not match Licensing in the Asset Report


Article ID: 260553


Updated On:


Client Management Suite Asset Management Suite IT Management Suite Software Management Solution


We have configured a software product and see in the software view fewer installations, as reported by our Software Inventory, than from the Asset & Service Management - Software License view.



Release: 8.6


The issue was traced to the Software Product Licensing Recalculation Operation Task failing every day during the scheduled run. Running it manually also failed. We verified based on the error below that the resources (CPU/Memory/Disk) were sufficient. We then traced the issue to the SQL Server and the compatibility level, which was configured as SQL Server 2019. 

Notification Server Log Error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Altiris.NS.Exceptions.AeXException: License calculating failed ---> System.Data.SqlClient.SqlException: The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Altiris.NS.DataAccessLayer.DatabaseAbilities.ExecuteNonQuery(CommandType t, String sql, Object[] parampairs)
   at Altiris.ContractManagement.Utilities.SoftwareLicenseCalculationHelper.ReCalculate(Guid swProductResourceGuid, String culture)
   --- End of inner exception stack trace —
   at Altiris.ContractManagement.Utilities.SoftwareLicenseCalculationHelper.ReCalculate(Guid swProductResourceGuid, String culture)
   at Altiris.ContractManagement.Utilities.SoftwareLicenseCalculationHelper.ReCalculateAllSoftwareProducts(String culture)
   at Altiris.ContractManagement.Settings.SoftwareLicenseRunOperation.SoftwareLicenseRunOperation_Process()
   --- End of inner exception stack trace —
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Altiris.AssetContractCommon.Operation.ScheduleHandler.Execute(ParameterValueCollection inputParams, ParameterValueCollection outputParams)
   at Altiris.AssetContractCommon.Operation.OperationTask.OnExecute(IServerTaskExecutionInstance instance)
Process: AtrsHost (7960), Thread ID: 89, Module: Altiris.AssetContractCommon.dll
Priority: 1, Source: OnExecute


Changed the SQL Server Compatibility level to SQL Server 2016 (130)



If changing the SQL compatibility mode still doesn't resolve your issue, there are other fixes introduced for customers with ITMS 8.6 RU3 and added to the 8.7 RU1 (8.7.1) release as well:
A pointfix ( is available only for 8.6 POST RU3: