JDBC Drivers
The following topic lists drivers which are shipped with Redwood Platform, their basic database URL syntax, and driver name.
You must ensure the drivers are in the classpath and accessible to Redwood Server. If your driver is not on the classpath, upload the jar file containing your JDBC driver into a library and reference its name in the Connection >Library field for your database under Environment > Databases.
IBM DB2
jdbc:db2://<host>:<port>/<db>
com.ibm.db2.jcc.DB2Driver
Oracle Thin Client
jdbc:oracle:thin:@<host>:<port>:<SID>
oracle.jdbc.OracleDriver
PostgreSQL
jdbc:postgresql://localhost:5432/example
org.postgresql.Driver
Microsoft SQL Server
jdbc:sqlserver://<host>:<port>[[;DatabaseName=<db>] [<property>=<value>] ...]
com.microsoft.sqlserver.jdbc.SQLServerDriver
note
MS SQL Server must be configured to listen on a static port (default 1433
) and accept SQL Server authentication (also known as mixed mode or SQL Server and Windows authentication). The above syntax should cover most implementations; more information on Microsoft SQL Server JDBC connect strings can be found on MSDN. Note that integrated authentication will use the credentials of the owner of the central Redwood Server process and that the examples on MSDN ften illustrate integrated authentication. When Redwood Server is run on UNIX, integrated authentication will require additional configuration that is out of the scope of this document. Furthermore, kerberos authentication is also possible, however, kerberos authentication configuration is out of the scope of this document.
When you attempt to retrieve date-related data from an MS SQL Server database using the MS SQL Server JDBC driver in combination with a Java 11 JVM, the date will be off by two days. This is an issue in the MS SQL Server JDBC driver version 3 and you have the following options to work around this issue: Install the hotfix released by Microsoft or use the version 2 or 4 of the MS SQL Server JDBC driver. See the Microsoft JDBC team's blog.
SAP/Sybase Adaptive Server Enterprise, Sybase IQ, SQL Anywhere, and Replication Server
You will have to retrieve the driver from SAP and import it into a custom library.
jdbc:sybase:Tds:<host>:<port>/<db>
com.sybase.jdbc3.jdbc.SybDriver
SAP HANA
You will have to retrieve the driver from SAP and import it into a custom library. If you have maven, you can retrieve it from mvn ngdbc.
jdbc:sap://<host>:<port>[?<option1>=<value1>[&<option2>=<value2>]*]
com.sap.db.jdbc.Driver
Examples
The following examples illustrate how to use the above drivers in a JDBC process server named Example.JDBCProcessServer:
IBM DB2
Tab | Field | Value |
---|---|---|
Database | Partition | Example |
Database | Name | JDBCProcessServer |
Database | Description | Production IBM DB2 database |
Database | Connection > Library | |
Database | Connection > Jdbc Driver Class Name | com.ibm.db2.jcc.DB2Driver |
Database | Jdbc Url > Advanced | jdbc:db2://db2.example.com:50000/msln |
Oracle
Tab | Field | Value |
---|---|---|
Database | Partition | Example |
Database | Name | JDBCProcessServer |
Database | Description | Production Oracle database |
Database | Connection > Library | |
Database | Connection > Jdbc Driver Class Name | oracle.jdbc.OracleDriver |
Database | Jdbc Url > Avanced | jdbc:oracle:thin:@oracle.example.com:1521/orcl |
PostgreSQL
Tab | Field | Value |
---|---|---|
Database | Partition | Example |
Database | Name | JDBCProcessServer |
Database | Description | Production PostgreSQL database |
Database | Connection > Library | |
Database | Connection > Jdbc Driver Class Name | org.postgresql.Driver |
Database | Jdbc Url > Avanced | jdbc:postgresql://localhost:5432/example |
SQL Server
Tab | Field | Value |
---|---|---|
Database | Partition | Example |
Database | Name | JDBCProcessServer |
Database | Description | Production MS SQL database |
Database | Connection > Library | |
Database | Connection > Jdbc Driver Class Name | com.microsoft.sqlserver.jdbc.SQLServerDriver |
Database | Jdbc Url > Avanced | jdbc:microsoft:sqlserver://mssql.example.com:1433;DatabaseName=Example |
note
MS SQL Server does not by default listen on TCP network ports, this has to be configured.
SAP/Sybase Adaptive Server Enterprise
Tab | Field | Value |
---|---|---|
Database | Partition | Example |
Database | Name | JDBCProcessServer |
Database | Description | Production SAP ASE database |
Database | Connection > Library | Custom_JDBCDrivers |
Database | Connection > Jdbc Driver Class Name | com.sybase.jdbc3.jdbc.SybDriver |
Database | Jdbc Url > Avanced | jdbc:sybase:Tds:syb.example.com:5000/Example |
SAP HANA
This example validates the certificate, this means the certificate must be in your Java trust store or in a X509_TrustedCertificate credential. Ensure your central server can access your SAP HANA database, you need to set the Allow only specific IP addresses and IP ranges to its IP address or an IP address range.
Tab | Field | Value |
---|---|---|
Database | Partition | Example |
Database | Name | JDBCProcessServer |
Database | Description | Production PostgreSQL database |
Database | Connection > Library | Custom_JDBCDrivers |
Database | Connection > Jdbc Driver Class Name | com.sap.db.jdbc.Driver |
Database | Jdbc Url > Avanced | jdbc:sap:ecc1234.hana.us10.hanacloud.ondemand.com:443&encrypt=true&validateCertificate=true |