UPDATE dynamics..ess80300 SET status = 2 WHERE PSTMSTID = 32377
Status:
2 = posted
12 = resubmitted
What happens is that if a document enters an error state, there is a period that you have to wait. This period is user controllable from 1 hour up, and defaults to 24 hours.
This is a small problem for me, I'd like it to resume scanning immediately. The script above is what I use to make that happen.
You have to understand the table in order to make this work, and it's not my purpose today to go into that. I just want to record the snippet so I can find it when I need it.
IF EXISTS (
SELECT *
FROM INFORMATION_SCHEMA.ROUTINES
WHERE SPECIFIC_SCHEMA = N'dbo'
AND SPECIFIC_NAME = N'dd_Postmaster_Resume'
)
DROP PROCEDURE dbo.dd_Postmaster_Resume
GO
CREATE OR ALTER PROCEDURE dd_Postmaster_Resume
AS
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
DECLARE @mstmstid int
SELECT @mstmstid = MAX(pSTMSTID)
FROM dynamics..ess80300
WHERE STATUS <> 2
UPDATE dynamics..ess80300 SET status = 2 WHERE PSTMSTID = @mstmstid
GO
Grant EXEC on dd_Postmaster_Resume to public