Multi Company Process log file error

Hi,

I’m getting an Error in Multi-company Schedule running time error. because of this, it is not coming in intercompany PO suggestions.

“System.InvalidOperationException: The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.”

If anyone has any suggestions kindly help on this. it will be helpful for me.,

@Chad_Smith @ckrusen @josecgomez @dkottier @Nancy_Hoyt @MiguelS

MultiCompanyDirect.log.txt (6.8 KB)

This is the error getting. anyone have any suggestions

@Jonathan @Theodorus_Gumilang @Jonathan_Lang @5775 @Bart_Elia @hkeric.wci @JeffLeBert

10/11/2023 2:21:06 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) -------------------- Starting --------------------
10/11/2023 2:21:06 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Started Multi-Company Process
10/11/2023 2:21:09 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Started Outbound Queue Processor
10/11/2023 2:21:12 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Started Inbound Queue Processor
10/11/2023 2:21:15 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Stopping Multi-Company
10/11/2023 2:21:15 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Stopping Inbound Queue Processor
10/11/2023 2:21:15 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Error: System.InvalidOperationException: The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.
at System.Data.SqlClient.SqlInternalConnectionTds.CheckEnlistedTransactionBinding()
at System.Data.SqlClient.TdsParser.TdsExecuteSQLBatch(String text, Int32 timeout, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean sync, Boolean callerHasConnectionLock, Byte[] enclavePackage)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Ice.Services.ContextFactory.SetLockTimeout(DbConnection dbConnection) in C:\_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Services\ContextFactory.cs:line 209 at Ice.Services.ContextFactory.InitializeContext(IceDataContext dataContext) in C:\_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Services\ContextFactory.cs:line 173 at Ice.Services.ContextFactory.CreateDirect[TContext](SqlConnection sqlConnection) in C:\_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Services\ContextFactory.cs:line 153 at Ice.Triggers.Default.DeleteTrigger2.DeleteChangeLog(LinqRow recordToDelete) in c:_Releases\ICE\RL3.2.300.0\Source\Server\Db\Triggers\Default\Delete.cs:line 41
at Ice.Triggers.Default.DeleteTrigger2.Delete(TRec oldRecord) in c:\_Releases\ICE\RL3.2.300.0\Source\Server\Db\Triggers\Default\Delete.cs:line 14 at Ice.DataTrigger2.Ice.ILinqTrigger.Delete(LinqRow oldRecord) in C:_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.Ice\Triggers\TriggerBase.cs:line 33
at Ice.Triggers.TriggerQueue.ExecuteDeleteTrigger(IceDataContext context, LinqRow originalRecord) in C:_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 259
at Ice.Triggers.TriggerQueue.RunDeleteTrigger(IceDataContext context, LinqRow linqRow) in C:_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 124
at Ice.IceDataContext.DeleteObject(Object entity) in C:_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 230
at Erp.Internal.SI.SIM130_Direct.RunSIM130_Direct(String ipCurrentCompany, Int64 instanceTaskNum, String outputFilename, String ipProcessName, String ipProcessDesc, Decimal ipProcessingDelay, Int32 ipLogLevel, String ipProcessingBranch, String ipProcessingBranchName, Boolean ipContinuous, String ipExtCompanyList) in C:_Releases\ERP\UD10.2.300.12\Source\Server\Internal\SI\SIM130\SIM130-Direct.cs:line 424
10/11/2023 2:21:15 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Error: Stack Trace
at System.Data.SqlClient.SqlInternalConnectionTds.CheckEnlistedTransactionBinding()
at System.Data.SqlClient.TdsParser.TdsExecuteSQLBatch(String text, Int32 timeout, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean sync, Boolean callerHasConnectionLock, Byte[] enclavePackage)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Ice.Services.ContextFactory.SetLockTimeout(DbConnection dbConnection) in C:\_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Services\ContextFactory.cs:line 209 at Ice.Services.ContextFactory.InitializeContext(IceDataContext dataContext) in C:\_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Services\ContextFactory.cs:line 173 at Ice.Services.ContextFactory.CreateDirect[TContext](SqlConnection sqlConnection) in C:\_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Services\ContextFactory.cs:line 153 at Ice.Triggers.Default.DeleteTrigger2.DeleteChangeLog(LinqRow recordToDelete) in c:_Releases\ICE\RL3.2.300.0\Source\Server\Db\Triggers\Default\Delete.cs:line 41
at Ice.Triggers.Default.DeleteTrigger2.Delete(TRec oldRecord) in c:\_Releases\ICE\RL3.2.300.0\Source\Server\Db\Triggers\Default\Delete.cs:line 14 at Ice.DataTrigger2.Ice.ILinqTrigger.Delete(LinqRow oldRecord) in C:_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.Ice\Triggers\TriggerBase.cs:line 33
at Ice.Triggers.TriggerQueue.ExecuteDeleteTrigger(IceDataContext context, LinqRow originalRecord) in C:_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 259
at Ice.Triggers.TriggerQueue.RunDeleteTrigger(IceDataContext context, LinqRow linqRow) in C:_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Triggers\TriggerQueue.cs:line 124
at Ice.IceDataContext.DeleteObject(Object entity) in C:_Releases\ICE\ICE3.2.300.12\Source\Framework\Epicor.System\Data\IceDataContext.cs:line 230
at Erp.Internal.SI.SIM130_Direct.RunSIM130_Direct(String ipCurrentCompany, Int64 instanceTaskNum, String outputFilename, String ipProcessName, String ipProcessDesc, Decimal ipProcessingDelay, Int32 ipLogLevel, String ipProcessingBranch, String ipProcessingBranchName, Boolean ipContinuous, String ipExtCompanyList) in C:_Releases\ERP\UD10.2.300.12\Source\Server\Internal\SI\SIM130\SIM130-Direct.cs:line 424
10/11/2023 2:21:15 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Stopping Outbound Queue Processor
10/11/2023 2:21:16 PM (Server:localhost PID:6968 DB:EPICORDB\ERP10Live Task:1624358) Multi-Company Process - Stopped

Do you have any Data or Method directives using SQL connections?

Do you have a direct SQL session open in another tool (maybe in SSMS) where you were cleaning up the IntQue tables and have an open transaction?

@Mark_Wonsil No SQL connections in data or method directive.

i’m not cleaning up the tables anywhere.

Is it possible that there are two Intercompany Processes running at the same time? You’ll need to check at the server as the Task Agent might not know if the process was orphaned. A reboot would clear it if it’s operationally feasible.

@Mark_Wonsil Task agent without recurring tried one by one company manually runned and as per Epicor Restarted the SQL server. still the same issue.

please find the Epicor given this in knowledge search

Sorry Kumaar, I think this is a Support ticket. I’m fresh out of ideas.

@Mark_Wonsil … should this be a process set and not a scheduled job? Should the IC process not be run in parallel for any reason?

I haven’t been doing IC for a few years, so it’s not ringing a bell for me.

1 Like