The JDBC adapter supports another type of adapter service (Dynamic SQL). This would work if you have the same table structures in different schemas within the same database. Say you wanted to perform a simple insert like the following, only changing the schema from ‘default’ via an input to your service:
insert into default.mytable (value1, value2) values (‘foo’,‘bar’)
You would enter a SQL statement like this into the dynamic SQL adapter service like so:
insert into ${myschema}.mytable (value1, value2) values (?,?)
Then you would finish the setup of the dynamic SQL service (i.e. defining input parameters for the two ‘?’ inputs). After this if you looked at the input signature for your adapter service you would see the following inputs (assuming you named the variable inputs value1 and value2):
doc > myInsertServiceName
doc > overrideCredentials
string > $dbUser
string > $dbPassword
string > myschema
string > value1
string > value2
I’m not sure from your question if this is what you were trying to achieve; however, this method will work to allow you to dynamically change the schema you interact with at runtime, provided the table structure is the same across schemas.
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services