On occasion, my Notification Server log files display the following error:
Failed to load inventory. [Failed to execute query - dbo.sp_ResourceGenerateHistorySnapshot 'f4721c64-179d-4a69-a8c3-a85f2f2ae310', '3dfb8303-dbb5-4db0-a2d3-1a6a61d223c6' The statement has been terminated. Source: Microsoft OLE DB Provider for SQL Server]
Description: ItemMessageDispatcherService::Dispatch ( Unhandled exception. Type=Altiris.NS.Exceptions.AeXException Msg=Failed to load inventory. [Failed to execute query - dbo.sp_ResourceGenerateHistorySnapshot '7ded3d56-4837-45c3-bf5b-c3cb5ece6536', '3dfb8303-dbb5-4db0-a2d3-1a6a61d223c6' The statement has been terminated. Source: Microsoft OLE DB Provider for SQL Server] Src=Altiris.NSStackTrace=at Altiris.NS.LegacyInterop.ItemMessageDispatcherService.Dispatch(String message, Boolean useFilename)
Inner exception. Type=System.Runtime.InteropServices.COMException Msg=Failed to execute query - dbo.sp_ResourceGenerateHistorySnapshot '7ded3d56-4837-45c3-bf5b-c3cb5ece6536', '3dfb8303-dbb5-4db0-a2d3-1a6a61d223c6' The statement has been terminated. Source: Microsoft OLE DB Provider for SQL Server Src=AeXOledb.Connection.1 StackTrace= at AeXOledb.ConnectionClass.ExecuteSQLNoResults(String query, Int32& rowCount)at Altiris.NS.ResourceManagement.Database.DataLoaderOledbConnection.ExecuteSQLNoResults(String query, Int32& rowsAffected)
at Altiris.NS.ResourceManagement.DataClassRowCollection.CommitData_Impl(IDataLoaderConnection connection) at Altiris.NS.ResourceManagement.DataClassRowCollection.CommitData(IDataLoaderConnection connection) at Altiris.NS.ResourceManagement.DataClassImporter.ProcessData(DataClass dataClass, XmlReader reader, Guid resourceGuidOverride, ProcessingDirective processingDirective) at Altiris.NS.ResourceManagement.DataClassImporter.LoadInventory_Impl(XmlReader reader, Boolean bProcessData, Boolean bForceSchemaValidation, Guid resourceGuidOverride)
COM Exception errcode = -2147217833 )
The column name "Extension" on the history table for the dataclass specified had a nvarchar length of 3. However, the same column for the regular non-history table had a length of 25. In this example, the table was Aex_SW_Disk_Usage and its corresponding history table InvHist_Aex_SW_Disk_Usage.
This could also be caused from an upgrade of Inventory Solution.
The first step should be to try what is suggested in article 35805.Once you implement the resolution in that article, you should then try to reprocess the bad NSE files to see if the error comes back. If it does then the following should be checked:
Check the value field for the extension column on the history table and corresponding table and compare them. They should be set to 25. If they are not set to 25 on the history table, then change it to 25.
You can check this by viewing the schema of the tables.
In SQL 2000, go into Enterprise Manager and find the table in question. Right-click on it and choose Design Table. This will bring up the schema of the table where you can look for the value of the extension column.
In SQL 2005, go into SQL Configuration Management Studio and find the table names. Right-click and choose Modify.
In either version of SQL, you should be able to manually input the value of 25.
Applies To Notification Server 6.0 SP3 Inventory Solution 6.x
Imported Document ID: TECH37021
Subscribing will provide email updates when this Article is updated. Login is required.