Consider a situation where all client data is stored in its own database / directory, and all such databases are stored in a single RDBMS (client data). Master data (for example, clients, ...) is stored in another DBMS (master data). How can we dynamically access a specific database in RDBMS client data using JdbcTemplate?
Defining DataSourceclient data for each database in RDBMS, and then dynamically selecting one of those proposed here , is not an option for us, since databases are created and destroyed dynamically.
I basically need something like JDBC Connection.setCatalog(String catalog), but I haven't found anything like it in Spring JdbcTemplate.
source
share