Change CommandTimeout of SSIS OleDB Source programmatically?

2.2k Views Asked by At

in a quite big project we recently received the request to execute certain SSIS packages during regular business hours. However, while the package can take as long as it needs during the night, during working hours it is most important to stop execution as soon as the source query exceeds a given time.

I am aware, that there is a property of the OleDB source which can be set, but is there any way to set it programmatically / via expression? There should be a way to parametrize this timeout, no?

Thanks for any help.

2

There are 2 best solutions below

4
On BEST ANSWER

You cannot do it with Expressions – see Microsoft Doc for available properties for a Data Flow. None of OLE DB Source properties is exposed as expression.

You can create another package with fixed OLEDB Source timeouts, and start it when needed. If you really want to parametrize it, you can generate package with BIML providing needed value at generation time; but you do not have a flexibility to change it at runtime.

2
On

This here is what your looking for.

enter image description here

This allows you to set the time of your query when it should timeout.