I have message flow with compute node, which is calling some stored procedure from database. I set up data source field on this node for db1, same name exists in odbc.ini file. Now I want dynamically(without redeploying) change datasource to db2. For now I've found theese two solutions, but both of them ugly:
Declare user-defined properties for db name and schema, and call stored procedure like this:
CALL SOME_PROC() IN DATABASE.{UDP_DBNAME}.{UDP_DBSCHEMA};
Then you can change this properties in runtime using broker API and flow will catch it immediately.
Are there any other options?
As per your requirements, you can do something like this:
DB1
and DB2
in your odbc.ini
fileDB1
and the other with DB2
Out1
is connected to ComputeNodeDB1
and Out2
is connected to ComputeNodeDB2
.With this solution, DB can be dynamically determined during runtime!