Skip to content
English
  • There are no suggestions because the search field is empty.

SQL Script - Mark distributed document complete in the database

Run the following script to recall a list of failed distribution records for the required document.

Select a.documentid, dq.* from DistributionQueueItem dq

Inner join Activity a on a.id = dq.activityid

where a.documentid = 12345

Where distribution is Status of 2 this is complete Status of 3 is failed
May show another status e.g. 5

If the document is in distribution failure, then run the following script and then mark complete:

Update DistributionQueueItem set [Status] = 2, CompletionDate = GetUTCDate(), FailureReason = 'Manually Completed at MN request' where id = IDFROMLASTQUERY

To mark the document activity status as complete: 

Update Activity set finished = GETUTCDATE(), [Status] = 2 where id = ACTIVITYIDFROMFIRSTQUERY