I have run a DEXSQL.log and there does not appear to be one single very long running script but many runs of these statements with changing ORDER or INVOICE numbers:
/* Date: 02/27/2019 Time: 8:33:18
stmt(50784016):*/
{ CALL ##zDP_1625732S_1 ( '2019.01.29', 2, 11, 'ORD42885', '7062786339' ) }
/*
/* Date: 02/27/2019 Time: 8:33:18
SQLSTATE:(01000) Native Err:(5701) stmt(0):*/
[Microsoft][SQL Server Native Client 11.0][SQL Server]Changed database context to 'master'.*/
/*
/* Date: 02/27/2019 Time: 8:33:18
SQLSTATE:(01000) Native Err:(5703) stmt(0):*/
[Microsoft][SQL Server Native Client 11.0][SQL Server]Changed language setting to us_english.*/
/*
/* Date: 02/27/2019 Time: 8:33:18
SQLSTATE:(00000) Native Err:(5703) stmt(0):*/
*/
/*
/* Date: 02/27/2019 Time: 8:33:18
SQLSTATE:(00000) Native Err:(5703) status(0):*/
SWSTATUS DUMP*/
/* Date: 02/27/2019 Time: 8:33:18
stmt(50805248):*/
BEGIN SET DATEFORMAT ymd
SET NOCOUNT ON
SET CURSOR_CLOSE_ON_COMMIT OFF
SET ANSI_NULLS ON
SET ANSI_WARNINGS OFF
SET ANSI_NULL_DFLT_ON ON
SET ANSI_PADDING ON
SET NUMERIC_ROUNDABORT OFF
END
/* Date: 02/27/2019 Time: 8:33:18
stmt(50802016):*/
use KHGP
/*
/* Date: 02/27/2019 Time: 8:33:18
SQLSTATE:(01000) Native Err:(5701) stmt(50802016):*/
[Microsoft][SQL Server Native Client 11.0][SQL Server]Changed database context to 'KHGP'.*/
/*
/* Date: 02/27/2019 Time: 8:33:18
SQLSTATE:(00000) Native Err:(5701) stmt(50802016):*/
*/
/*
/* Date: 02/27/2019 Time: 8:33:18
SQLSTATE:(00000) Native Err:(5701) status(0):*/
SWSTATUS DUMP*/
/* Date: 02/27/2019 Time: 8:33:18
stmt(50802016):*/
select top 1 WorkflowInstanceID from WFI10002 where Workflow_Type_Name='Sales Transaction Approval' and WfBusObjKey='ORD42885~2'
/* Date: 02/27/2019 Time: 8:33:18*/
Prepared stmt(50812520):
AND THESE:
* Date: 02/27/2019 Time: 8:33:18
stmt(50802016):*/
select top 1 WorkflowInstanceID from WFI10002 where Workflow_Type_Name='Sales Transaction Approval' and WfBusObjKey='ORD42887~2'
/* Date: 02/27/2019 Time: 8:33:18
stmt(50802016):*/
BEGIN DECLARE @stored_proc_name char(27) DECLARE @retstat int DECLARE @param5 char(51) DECLARE @param6 char(37) DECLARE @param7 smallint DECLARE @param8 datetime DECLARE @param9 datetime DECLARE @param10 char(238) DECLARE @param11 char(238) DECLARE @param12 int set nocount on SELECT @param5 = '' SELECT @param6 = '' SELECT @param7 = 0 SELECT @param8 = '1900.01.01' SELECT @param9 = '00:00:00' SELECT @param10 = '' SELECT @param11 = '' SELECT @stored_proc_name = 'KHGP.dbo.wfGetNavListFields' EXEC @retstat = @stored_proc_name '0B64B3AB-67DA-426C-A615-C46ABE892062', 'KHIND\JoePowers', 'Sales Transaction Approval', 'ORD42887~2', @param5 OUT, @param6 OUT, @param7 OUT, @param8 OUT, @param9 OUT, @param10 OUT, @param11 OUT, @param12 OUT SELECT @retstat, @param5, @param6, @param7, @param8, @param9, @param10, @param11, @param12 set nocount on END
/* Date: 02/27/2019 Time: 8:33:18*/
BEGIN UPDATE ##1625732 SET Workflow_Name = ?, Workflow_Originator = ?, WorkflowInstanceID = ?, Workflow_Type_Name = ? WHERE Workflow_Name = ? AND Workflow_Originator = ? AND WorkflowInstanceID = ? AND Workflow_Type_Name = ? AND DOCDATE = ? AND SOURCE = ? AND DOCTYPE = ? AND DOCNUMBR = ? AND CUSTNMBR = ? SELECT @@rowcount END
/* Date: 02/27/2019 Time: 8:33:18*/
Prepared stmt(50812520):
/* Date: 02/27/2019 Time: 8:33:18
stmt(50784016):*/
{CALL ##zDP_1625732N_1(25,'2019.01.30',2,11,'ORD42887','7122777496',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)}
I could send the entire log if it helps.