I am able to use JDBC to connect to an Oracle DB or a MySQL DB. It works great. Now I am trying to connect to both databases at the same time. How do I do that? Can I use two different drivers at the same time?
Here’s an example of the MySQL connection. How would I also add a connection to Oracle in the same script?
using JDBC JDBC.usedriver(MYSQL_DRIVER) JDBC.init() mysqlConn = JDBC.Connection("jdbc:mysql://$MYSQL_SERVER:$MYSQL_PORT/$MYSQL_SCHEMA?user=$MYSQL_USER&password=$MYSQL_PASS&useSSL=false") mysqlCursor = cursor(mysqlConn) strSQL = "select * from manu_history limit 5 " println(strSQL) execute!(mysqlCursor, strSQL) column_names = map(x -> Symbol(x), JDBC.colnames(JDBC.Source(mysqlCursor))) println(column_names) for r in rows(mysqlCursor) println(r) end close(mysqlCursor) close(mysqlConn) JDBC.destroy()