AdHoc JDBC Queries without Ignition DataSources

I have a dynamic set of database server connections (100+). Is it possible to create a jdbc connection via scripting using something similar to the jython zxJDBC package to handle connections temporarily, rather than creating gateway data sources?
Would it better to dynamically create and remove / disable dataSources using the system.db.addDatasource() to avoid keeping a large list of connections running on the gateway?

It is possible, yes. I would avoid any Jython libraries and directly use JDBC methods. You’re going to want to do it from the gateway, and I would recommend using a module to introduce the necessary JDBC driver classes into your scripting scope (Ignition’s JDBC drivers are on an isolated classloader, so you aren’t able to directly make connections using them).

Okay thank you. The isolated classloader explains why I was not able to access the existing JDBC driver.