TIC Error: Tried opening a closed connection on <connection>

Automation job runs fine from TDP, but when I send it to TIC, it errors on second select to file script. This just started happening when we upgraded to 6.1 and it is happening on multiple automation scripts. The error message is:

-- 8/15/2023 6:14:23 AM: PW_Airline_Landing_Stats.log: Beginning export
-- 8/15/2023 6:14:23 AM: PW_Airline_Landing_Stats.log: Get_Landing_Weight_Stats - Tried opening a closed connection on PWPROD (tic_loadprocess) (as of 7/15/2023)

Closed from:
at Quest.Toad.Db.Connection.ForceClose()
at Quest.Toad.Db.Connection.Close()
at Quest.Toad.Workflow.Activities.Database.DatabaseConnectionActivity.CloseConnection()
at System.Workflow.ComponentModel.Activity.MarkClosed() at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
at System.Workflow.Runtime.Scheduler.Run()
at System.Workflow.Runtime.WorkflowExecutor.RunScheduler()
at System.Workflow.Runtime.WorkflowExecutor.RunSome(Object ignored) at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.WorkItem.Invoke(WorkflowSchedulerService service) at System.Workflow.Runtime.Hosting.DefaultWorkflowSchedulerService.QueueWorkerProcess(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

-- 8/15/2023 6:14:23 AM: PW_Airline_Landing_Stats.log: Tried opening a closed connection on PWPROD (tic_loadprocess) (as of 7/15/2023)

I would say best to open a Quest Support ticket on this one, especially if it's started happening when you upgraded.

May I know if there is any solution for this issue. I encountered the same issue in version 6.1

Nope, not completely solved yet.

The solution I was given was to make sure each script file in my automation file included only one select statement. I modified some scripts and the problem seemed to have disappeared, BUT I am still encountering it with automation scripts that have multiple sql files (each with a single select statement). I did notice that some of my scripts will error on TIC but not when run manually on TDP, and some will run fine in TIC if I add a 30 second pause between the scripts in the automation file. It's hit or miss on what works for each file.

Thank you for the input. Added 30 sec pause in between scripts and it's hit for me for now.
Anyway, this causing the flow taking more than 2 mins to complete for 4 scripts which shouldn't be the correct way. This issue was not there when I am using ver 6.0 and below.

Agreed, problem appeared for me with 6.1

We had the problem in 6.1 so we upgraded to 6.2, but still have the issue