Software Product Licensing Recalculation Operation Task fails with error: Exception has been thrown by the target of an invocation.
search cancel

Software Product Licensing Recalculation Operation Task fails with error: Exception has been thrown by the target of an invocation.

book

Article ID: 247598

calendar_today

Updated On:

Products

Client Management Suite IT Management Suite

Issue/Introduction

The Software Product Licensing Recalculation Operation Task fails to execute.

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)

------------------------------------------------------------------------------------------------

Environment

Release: 8.5

 

Cause

The Compatibility Level in SQL Server is not set properly. 

Resolution

Change the compatibility level to 2012 or other supported versions:

SQL>right click on Symantec_CMDB and choose Properties>Options> Compatibility Level

For ITMS 8.6 and later:

Refer to "Software Licensing View does not match Licensing in the Asset Report" (KB 260553)