Switching credentials automatically between local/server


We have a wf with DB nodes, and we want that wf chooses between two database credentials, depending on if it’s executed locally (my machine) or in the server, because we have created individual users for this database, and also a knime server user. So, we have created this wrapped metanode as template:

Single selection node allows us to choose between automatic login (which selects credentials based on where we are, local machines or server), or manual login (both user or knime server options).

This metanode works great locally, and we thought also the same about the server, but we are having a lot of problems with DB nodes in some wfs including this template: ORA12592, ORA28000,… (user blocked). So we are not sure this is an optimal approach. Also we have the problem that credentials arent managed very well as flowvariables, and this is even more complicated in the server where you cant visualize them.

We have tried to created a similar automated credential selection using workflow credentials, but they are only available at workflow level and not inside a wrapede metanode template. Another solution would be to create a template that outputs directly a db connection, but I would have to extend this connections everywhere.

Any other ideas?



How do you detect whether the workflow is run locally or on KNIME Server? I assume this happens based on the information you get from Extract System Properties?

Can you confirm that this detection works as expected?

Can you also post the exact error messages you are seeing? At first glance, I’m not sure if the issue is with the workflow, or rather how the connection to the DB is handled on the server.

Are you able to connect to the DB from the server in other workflows?


Hi Roland,

Environment detection is working great, based on “user.name” property. We can use this metanode to connect our db from local and knime server.

We have just discovered that our problems also appear when this wf is executed locally. So it seems that there is no problem with the automatic selection of db credentials or knime server but with the interaction between our database and knime platform, both server and local.

And for the errors (ORA-12592), I can redirect you to this thread.

Thank you.

1 Like

Good idea going by user.name. I did this once by looking for “job” in the path, but I actually like your solution better!

Let’s see what Tobias replies in the other thread - he is certainly the right person to help you when it comes to DBs :slight_smile:


1 Like