<db:stored-procedure doc:name="Stored procedure" doc:id="bbe98f4a-3f4e-44f2-950f-fa0f1d4c671c" config-ref="Database_Config"> <db:sql><![CDATA[CALL sys123.GetAllData()]]></db:sql> </db:stored-procedure>When this is run, the count of active connections increases by 1 for every call to the stored procedure.
In Mule 4 database streaming is always enabled by default. So when the streaming option is enabled for the stored procedure call, the connection, statement, and result set are left open after execution completes.
As the streaming strategy is always enabled in Mule 4, we have to enclose the stored procedure in TRY Scope to close the connection after the Database Store Procedure call. Please refer the below example:
<try doc:name="Try" doc:id="8b471698-d359-4318-bb2a-388d52b1bddd" transactionalAction="ALWAYS_BEGIN"> <db:stored-procedure doc:name="Stored procedure" doc:id="bbe98f4a-3f4e-44f2-950f-fa0f1d4c671c" config-ref="Database_Config" transactionalAction="NOT_SUPPORTED"> <db:sql><![CDATA[CALL sys123.GetAllData()]]></db:sql> </db:stored-procedure> </try>
001121115

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.