Maybe you can try this Business opertion in Ensemble/HealthShare to a stored procedure in Cache.

BO:
Class User.TestSQLOperation Extends Ens.BusinessOperation
{

Parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";

Property Adapter As EnsLib.SQL.OutboundAdapter;

Parameter INVOCATION = "Queue";

Method OnMessage(pRequest As Ens.Request, Output pResponse As Ens.Response) As %Status
{
    set tSC = $$$OK
    SET sql="{?=call api.SimpleSP(?,?)}"
    set tSC=..Adapter.ExecuteProcedure(.rs,.out,sql,"oii",2,"Hello1")
    
    quit tSC
}

XData MessageMap
{
<MapItems>
                <MapItem MessageType="Ens.Request">
                                <Method>OnMessage</Method>
                </MapItem>
</MapItems>
}

}

SP:

Class api.TestSQL [ Abstract ]
{

ClassMethod SimpleMethod(Id As %String, Name As %String) As %Status [ SqlName = SimpleSP, SqlProc ]
{
                Set ^localData("Test")=$G(Id)_" "_$G(Name)
                If $L(Id) {
                                Set ^localData(Id)=$G(Name)
                }
                Quit $$$OK
}

}