JDBC drivers and connection strings

Recently I was fixing a bug in gadget creation in WSO2 DAS 3.1.0 in which gadget creation throws errors on some database types. So I have to check for major database types for gadget creation and I came up with following database drivers and connection strings and little more information their JDBC drivers.

Driver class : com.mysql.jdbc.Driver
Connection string : jdbc:mysql://localhost:3306/databaseName

You can download JDBC driver from their official site.

Driver class : com.microsoft.sqlserver.jdbc.SQLServerDriver
Connection string :jdbc:sqlserver://hostName:1433;database=databaseName

You can download MSSQL driver from microsoft site. According to the JRE it comes from several flavours as below.

• Sqljdbc41.jar requires a JRE of 7 and supports the JDBC 4.1 API
• Sqljdbc42.jar requires a JRE of 8 and supports the JDBC 4.2 API

Apart from official MSSQL driver there are other supported drivers like jtds as well. You can find more information about them by referring this stackoverflow question.

Driver class : org.postgresql.Driver
Connection string : jdbc:postgresql://localhost:5432/databaseName

You can download the PostgreSQL driver from their official site and it also comes in different flavours depend on the Java version. It would be very easy to work with PostgresSQL if you are using postgres.app. For mac users, note that to uninstall all previous versions of PostgreSQL versions to work with postgres app.

Driver class : com.ibm.db2.jcc.DB2Driver
Connection string : jdbc:db2://myhost:5021/mydb

You can download db2 JDBC driver from their official site.

Driver class : oracle.jdbc.OracleDriver
Connection string : jdbc:oracle:thin:@hostName:1521/wso2qa11g

You can download Oracle JDBC driver from their official site.


Popular posts from this blog

Application Whitelist and Blacklist Feature in WSO2 EMM

WSO2 APP Manager(APPM) and WSO2 Enterprise Mobility Manager (EMM) integration

How to map existing OAuth applications in WSO2 API Manager User Interface