Execute database query but don't wait for the results

This is my scenario:
I got 2 database, one is onPrem and one is in Azure. Since these two can’t talk to each other directly (company security policies get in the way) I’ve created a bot that reads the daily data-dump from the in-house DB and writes it to the cloud-DB.
The final step is execute a complex stored procedure in the cloud-DB to create a daily report.

And here is the problem:
The last step takes ~20 and 45min to finish, during this time the bot is doing exactly nothing but wait for the query to finish. The whole error handling for the analysis-step is actually do inside the DB, so there is no need to wait for the result.

What I’m looking for:
An execute query activity that doesn’t wait for the result. Execute a statement with fire and forget.

Any ideas welcome

/Günter

1 Like

Hey @guenter.schramm

You mean you no way needed the response… and what about the report generated please… is it automatically shared or saved without bot dependency ?

#nK

Hi @guenter.schramm ,

Wanted to share my thought. can we create SQL trigger to execute the query and we can execute the trigger alone in the Uipath so that it will just execute the trigger and wont wait for the result. Not sure this helps to your question. thanks.

CREATE TRIGGER (Transact-SQL) - SQL Server | Microsoft Docs.

Unfortunately that doesn’t work. Triggers run synchronously on INSERT and UPDATE, therefore it will still wait for the stored procedure to finish.

1 Like

Mmm ok got your point. Could you pls provide your valuable thoughts on this Tim
@codemonkee

Hey @guenter.schramm

Give a try with this please…

nmnithinkrishna_TerminateWFParallel.zip (2.1 KB)

Thanks
#nK

Hi,

I solved this in a different way: I’ve created an Elastic Job Agent (free Azure feature).

That agent has a job configured with excutes my stored procedure.
The uipath robot is no longer calling "exec " and then waits till it’s finished (20-25min later). Instead it now calls "exec " which immediately returns and the process resumes and finishes without a 20-25min waiting period.

The elastic job agent is actually starting the job almost immediately so I’m not losing any time here.

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.