|
To create a Database Alias in CenterView, you'll need the proper JDBC JAR file and two pieces of information. You'll need to know the driver class, as well as the URL to connect to the driver. We've documented some common combinations below. Note that we refer to a single JAR file, but some JDBCs require multiple files.
- Get the JAR file. Determine the database type you'll be connecting to and locate a JDBC driver for it. Look on the database distributor's website for their JDBC JAR file(you might also do a web search for JDBC JAR files, because some are third party.
- Install the JAR in CenterView/Server/corda/WEB-INF/lib. You'll need to stop and restart your application server so that it can re-read the classes in the Tomcat classpath.
- Determine the URL and driver. Hopefully, the JDBC will have documentation regarding the JAR file and indicate the driver and URL. You'll use this information when setting up the alias.
A JDBC URL looks something like jdbc:databasetype://hostname/databasename.
The driver will look like a Java class, something like: com.company.dbtype.driver.
Here is some information for various JDBC drivers we've used with CenterView:
Oracle: URL: jdbc:oracle:thin://serveraddress/dbname Driver: oracle.jdbc.driver.OracleDriver Jar file: oracle.jar
PostgreSQL: URL: jdbc:postgresql://serveraddress/dbname Driver: org.postgresql.Driver Jar file: postgresql.jar
DB2: URL: jdbc:db2://serveraddress/dbname Driver: com.ibm.db2.jcc.DB2Driver Jar files: db2jcc.jar and db2jcc_license_cu.jar
MySQL: URL: jdbc:mysql://serveraddress/dbname Driver: com.mysql.jdbc.Driver Jar file: mysql-connector-java-3.0.14-production-bin.jar
MS SQL (a): URL: jdb c:microsoft:sqlserver://serveraddress:1433;database=[dbname].[dbo] Driver:com.microsoft.jdbc.sqlserver.SQLServerDriver Jar files: msbase.jar, mssqlserver.jar, msutil.jar
MS SQL (b): URL: jdbc:jtds:sqlserver://serveraddress/dbname Driver: net.sourceforge.jtds.jdbc.Driver Jar file: jtds.jar
Sybase: URL: jdbc:jtds:sybase://serveraddress/dbname Driver: net.sourceforge.jtds.jdbc.Driver Jar file: jtds-1.2.jar
|