DB2 – how to specify properties for JDBC connections

One thing I also learned today while trying to set up a datasource for Tomcat is that you can set various properties for a DB2 JDBC connection via the connection URL. In this environment I need to set the currentSchema and currentFunctionPath properties to a user name that is different from the one I use to create the connection to the database. This is very easy via the URL:

Note that the schema name is capitalized and must be for it to work properly according to IBM’s documentation.

%d bloggers like this: