Home > Forum > Rules, JS, SQL > SQL Execution timeout

SQL Execution timeout
0

Hi there,
I have a data source of MSSQL type, that populates a data table. The SQL query is quite complicated but it works. However it currently takes about 33 seconds to complete. Thus when executed in SQL Studio, I get the output table. When I try to execute it in a bps process, it fails. When testing in Designer Studio, I get an error of execution timeout.
Is there a way to tell Webcon to allow a little more time for this sql?

Michal

MVP

Hi Michał,

I also would recommend to change your approach. Even if you would increase the timeout you may run into it again at a later point in time.

Another alternative could be to execute a PS Script, which spawns a new session and executes your script. You could use the invoke-sqlcmd for this.
https://docs.microsoft.com/en-us/powershell/module/sqlserver/invoke-sqlcmd?view=sqlserver-ps
Ones the command is executed the session closes automatically.
The workflow could trigger the execution and move into a system step. A timeout action could verify if the data is populated, or execute some other PS script to read some generated file, that the first PS has been executed successfully.

Best regards,
Daniel