✅ System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'Status'

При попутке обновления страницы в мониторе процессов с ошибками возникает следующее окно с ошибкой:

image-1596520973170.png

Кроме того, если завершить данный процесс, он так же не уйдет из списка проблемных.

В логах сервера видим следующее:

ERROR 2020-08-04 09:00:05,925 [114] EleWise.ELMA.Workflow.Processes.Web.Controllers.WorkflowQueueController - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.Exceptions.GenericADOException: could not execute query
[ SELECT top(20) tv.Id as Id613_0_, tv.Uid as Uid613_0_, tv.ElementUid as ElementUid613_0_, tv.CreationDate as Creation4_613_0_, tv.Attempt as Attempt613_0_, tv.LastExecuteDate as LastExec6_613_0_, tv.NextExecuteDate as NextExec7_613_0_, tv.LastError as LastError613_0_, tv.SkipExecution as SkipExec9_613_0_, tv.SkipConnectorUid as SkipCon10_613_0_, tv.Timeout as Timeout613_0_, tv.LastExceptionData as LastExc12_613_0_, tv.ServerConnectionUid as ServerC13_613_0_, tv.Instance as Instance613_0_, tv.Author as Author613_0_, tv.BackgroundOperation as Backgro16_613_0_ FROM (SELECT wqi.Id, wqi.Uid, wqi.Instance, wqi.ElementUid, wqi.CreationDate, wqi.Attempt, wqi.LastExecuteDate, wqi.NextExecuteDate, wqi.LastError, wqi.Author, wqi.SkipExecution, wqi.SkipConnectorUid, wqi.Timeout, wqi.LastExceptionData, 0 OnceExecuteStatus, wqi.ServerConnectionUid, wqi.BackgroundOperation
FROM WorkflowQueueItem wqi WITH(NOLOCK)
LEFT JOIN WorkflowInstance wi WITH(NOLOCK) ON wi.Id = wqi.Instance
LEFT JOIN WorkflowProcess wp WITH(NOLOCK) ON wi.Process = wp.Id
LEFT JOIN ProcessHeader ph WITH(NOLOCK) ON wp.Header = ph.Id
WHERE Attempt > 0 ) tv ORDER BY Status ]
[SQL: SELECT top(20) tv.Id as Id613_0_, tv.Uid as Uid613_0_, tv.ElementUid as ElementUid613_0_, tv.CreationDate as Creation4_613_0_, tv.Attempt as Attempt613_0_, tv.LastExecuteDate as LastExec6_613_0_, tv.NextExecuteDate as NextExec7_613_0_, tv.LastError as LastError613_0_, tv.SkipExecution as SkipExec9_613_0_, tv.SkipConnectorUid as SkipCon10_613_0_, tv.Timeout as Timeout613_0_, tv.LastExceptionData as LastExc12_613_0_, tv.ServerConnectionUid as ServerC13_613_0_, tv.Instance as Instance613_0_, tv.Author as Author613_0_, tv.BackgroundOperation as Backgro16_613_0_ FROM (SELECT wqi.Id, wqi.Uid, wqi.Instance, wqi.ElementUid, wqi.CreationDate, wqi.Attempt, wqi.LastExecuteDate, wqi.NextExecuteDate, wqi.LastError, wqi.Author, wqi.SkipExecution, wqi.SkipConnectorUid, wqi.Timeout, wqi.LastExceptionData, 0 OnceExecuteStatus, wqi.ServerConnectionUid, wqi.BackgroundOperation
FROM WorkflowQueueItem wqi WITH(NOLOCK)
LEFT JOIN WorkflowInstance wi WITH(NOLOCK) ON wi.Id = wqi.Instance
LEFT JOIN WorkflowProcess wp WITH(NOLOCK) ON wi.Process = wp.Id
LEFT JOIN ProcessHeader ph WITH(NOLOCK) ON wp.Header = ph.Id
WHERE Attempt > 0 ) tv ORDER BY Status ] ---> System.Data.SqlClient.SqlException: Invalid column name 'Status'.


Получено решение от СП вендора:

Создать резервную копию базы данных. После этого выполнить следующий запрос в БД:
delete from BlobStoreHolder where [Key] like '%WorkflowQueueItems%'
Он удалит все закешированные данные по таблице, в которой возникает ошибка.

Обязательно надо перезапустить сервер.
Для процессов, которые прерваны, но имеют счетчик ошибок 9+ придется ручками Выполнить обработку, чтобы они ушли из списка:

image-1596521847871.png


Версия #3
Вербовик М. А. создал Tue, Aug 4, 2020 9:01 AM
Вербовик М. А. обновил Tue, Aug 4, 2020 9:38 AM