I have multiple ms sql server databases x1, x2, x3, ... xn, effectively all the same schema type and one database y that is different and holds management data.
I am using jdbc prepared statements and there are occasions when the same prepared statement needs to be executed on multiple x databases from one program at one occasion.
If the prepared statement's SQL does not indicate a database:
Is the prepared statement associated just with the server, and if executed is executed on a database selected according to context, e.g. following a USE statement.
OR is it forever associated with the default database in the connection URL? If so, and I still want to use preprepared statements, must I create a prepared statement for every single database, even though the schemas and statements are in principal identical.