cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EvansEssence
Engaged Sweeper
Hello! I am having an odd issue with one of our subnets.

I am able to search for the device on our subnet, and it appears in the search tool as an asset. BUT, as soon as I click on said asset, I get the "Could not find this asset in the database. It does not exist or might be deleted"

3 REPLIES 3
EvansEssence
Engaged Sweeper
Hey Charles,

Sorry to get back to you late,

I am still having this issue after cleaning, I will try deleting the assets, it's just weird as it is objects in an entire subnet that have this issue
Esben_D
Lansweeper Employee
Lansweeper Employee
As a start you can try and clean up your database by following the steps in this article: https://www.lansweeper.com/kb/147/clearing-tables-to-free-up-space-and-improve-performance.html

If it doesn't solve the issue it is most likely because the asset was not correctly deleted from the database. If you can find out what the asset's ID is you can execute the following database script.

delete from tblassets
where assetid = <Insert Asset ID>


Do note that I would recommend taking a backup of your database before running any scripts.
EvansEssence
Engaged Sweeper
Here is a chunk of the Error.txt

02/26/2018 11:57:19: DEBUG UPDATE tblassetcustom SET state=1 WHERE AssetID=@AssetID AND state=2 Divide by zero error encountered.
The statement has been terminated.
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)
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 #=qiVFzAGg56MIsDoOm2IPYGhjyK1fRvwCbJJ1XQudR0Nc=.#=q7MYUr_zxoT$TKYlWE9IWBzp5L9hQJp74AzBaHHgAUS8=(IDbConnection #=qX$6J0FAOYvrN2UXmLCFfjg==, String #=qxqUNMJh6X2xWO5QZjT$xyg==, IDbDataParameter[] #=qmmlUWBOIE7SyhMR7NBInHbJ8ukiQ$CPJKuNRJXejffk=)
02/26/2018 11:57:19: DEBUG INSERT INTO tblAssetCustom (AssetID) select AssetID from tblAssets where AssetID = @AssetID and AssetID not in (select AssetID from tblAssetCustom) Divide by zero error encountered.
The statement has been terminated.
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)
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 #=qiVFzAGg56MIsDoOm2IPYGhjyK1fRvwCbJJ1XQudR0Nc=.#=q7MYUr_zxoT$TKYlWE9IWBzp5L9hQJp74AzBaHHgAUS8=(IDbConnection #=qX$6J0FAOYvrN2UXmLCFfjg==, String #=qxqUNMJh6X2xWO5QZjT$xyg==, IDbDataParameter[] #=qmmlUWBOIE7SyhMR7NBInHbJ8ukiQ$CPJKuNRJXejffk=)
02/26/2018 11:57:19: DEBUG INSERT INTO tblAssetCustom (AssetID) select AssetID from tblAssets where AssetID = @AssetID and AssetID not in (select AssetID from tblAssetCustom) Divide by zero error encountered.
The statement has been terminated.
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)
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 #=qiVFzAGg56MIsDoOm2IPYGhjyK1fRvwCbJJ1XQudR0Nc=.#=q7MYUr_zxoT$TKYlWE9IWBzp5L9hQJp74AzBaHHgAUS8=(IDbConnection #=qX$6J0FAOYvrN2UXmLCFfjg==, String #=qxqUNMJh6X2xWO5QZjT$xyg==, IDbDataParameter[] #=qmmlUWBOIE7SyhMR7NBInHbJ8ukiQ$CPJKuNRJXejffk=)
02/26/2018 11:57:31: DEBUG The network path was not found. (Exception from HRESULT: 0x80070035)
at Microsoft.Win32.TaskScheduler.V1Interop.ITaskScheduler.SetTargetComputer(String Computer)
at Microsoft.Win32.TaskScheduler.TaskService.Connect()
at #=qXDJb_ltNW1eky_DzkoqiwweLXLVcfPstyke6uP6WoyY5lRVSV6uGGq4hhwpeVoCk.#=qD1zbWnJITnl9tWJBhJMYZMFA8kIPEI3YkVP3Kwb0maw=(#=q6XbikYciTx52gQwriBQ02wTXchFt1czL6XLAAWNIkKg= #=qEbH37r66ay6z99xErGrc8w==, String #=qPUepIyclv1aDz2p3yr$EkQ==)
02/26/2018 11:57:45: compsystemprod Divide by zero error encountered.
The statement has been terminated.
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at #=qprPArSWkkseF$ZRngGUaHkxqogEilsx6KTYfaKrmd_o=.#=qLPWsCmJOKa2AGj3Mn1cQOTKAZX5rU_KlS_EmFKWqDBA=(DbDataAdapter #=qqsZTVM5b57OdI6nvqlJSOw==, String #=qxNNUy2gz8YbwFyISKOTwrw==, DataTable #=qTSoxKNzyVJ56eEO0l_OuoA==, IDbConnection #=qL8hLCJx7ucnmJaYxLAXLjw==)
02/26/2018 11:57:45: compsystem Divide by zero error encountered.
The statement has been terminated.
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at #=qprPArSWkkseF$ZRngGUaHkxqogEilsx6KTYfaKrmd_o=.#=qLPWsCmJOKa2AGj3Mn1cQOTKAZX5rU_KlS_EmFKWqDBA=(DbDataAdapter #=qqsZTVM5b57OdI6nvqlJSOw==, String #=qxNNUy2gz8YbwFyISKOTwrw==, DataTable #=qTSoxKNzyVJ56eEO0l_OuoA==, IDbConnection #=qL8hLCJx7ucnmJaYxLAXLjw==)
02/26/2018 11:57:48: updatedevicecust Divide by zero error encountered.
The statement has been terminated.
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at #=qprPArSWkkseF$ZRngGUaHkxqogEilsx6KTYfaKrmd_o=.#=qLPWsCmJOKa2AGj3Mn1cQOTKAZX5rU_KlS_EmFKWqDBA=(DbDataAdapter #=qqsZTVM5b57OdI6nvqlJSOw==, String #=qxNNUy2gz8YbwFyISKOTwrw==, DataTable #=qTSoxKNzyVJ56eEO0l_OuoA==, IDbConnection #=qL8hLCJx7ucnmJaYxLAXLjw==)
02/26/2018 11:58:12: Object cannot be cast from DBNull to other types.
at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)
at #=qySCT54OVtuSZhqQAYvqkWxLBWPOpbjJmobWz338y3RyuZxBR8dW0_L_MLuHJqOav.#=qTtcp4nd2qigmP8jJyLXrqw==(IDbConnection #=qvd0egRkyXjdUhJx5NgvUFQ==)
02/26/2018 11:58:12: LOGHELPDESKMAILSSENT DEBUG Get default account
02/26/2018 11:58:12: LOGHELPDESKMAILSSENT DEBUG Account: Helpdesk
02/26/2018 11:58:12: LOGHELPDESKMAILSSENT DEBUG Normal priority ticket
02/26/2018 11:58:12: LOGHELPDESKMAILSSENT DEBUG Getting history
02/26/2018 11:58:12: LOGHELPDESKMAILSSENT DEBUG Send email