Quick Start: Progress® DataDirect® for JDBC™ for Oracle Service Cloud™ Driver
The following information enables you to connect with and test your driver immediately after installation. For installation instructions, refer to the Installation Guide. This Quick Start covers the following topics:
Once the driver is installed, you can connect from your application to your data store in two ways: using the JDBC Driver Manager or using a JNDI data source. The following section provides information you need to get started using the drivers with the Driver Manager. For information on using data sources, refer to the User's Guide.
Set your system CLASSPATH to include the following entry:
Note: The dependent jar files that are installed with the rightnow.jar file must remain in the same directory as the rightnow.jar file for the driver to be able to find them without explicitly adding them to the class path.
To establish a database connection using the Driver Manager, your application must register the class name of the JDBC driver with the Driver Manager using the Class.forName() method and specifying the driver class name as the argument.
IMPORTANT: If using Java SE 6 or higher as a JVM, you do not need to register the driver and can skip this step. Java SE 6 or higher automatically registers the driver with the JDBC Driver Manager.
The application must then invoke the DriverManager.getConnection() method supplying a connection URL.
The classname and connection URL syntax for the Oracle Service Cloud driver are:
For example, a connection URL for an Oracle Service Cloud instance might take the following form:
Refer to the User's Guide for a complete description of the connection URL syntax and descriptions of the connection properties that can be specified.
// Register the driver with the driver manager.
// If using Java SE 6 or higher, you can omit this step.
// Java SE 6 and higher automatically registers the driver.
// Establish the Connection
String url = "jdbc:datadirect:oracleservicecloud:loginHost=mysite.com;
Connection con = DriverManager.getConnection(url, "test04", "test04");
// Verify the Connection
DatabaseMetaData metaData = con.getMetaData();
System.out.println("Database Name: " + metaData.getDatabaseProductName());
System.out.println("Database Version: " +
DataDirect Test™ for JDBC is a Java software component developed by Progress DataDirect to test JDBC applications. Use the following steps to test your connection:
1. Start DataDirect Test by running testforjdbc.bat (Windows) or testforjdbc.sh (UNIX/Linux) in the install_dir/testforjdbc directory, where install_dir is your installation directory.
2. Select Connect To DB from the Connection menu to configure your connection.
3. In the Database field, enter your connection URL as described above.
4. Enter your Oracle Service Cloud user name and password in the fields provided.
5. Click Connect.
Result: If the connection information is entered correctly, the JDBC/Database Output window reports that a connection has been established.
For more information about DataDirect Test for JDBC, refer to the User's Guide.
The driver has connection properties that directly affect performance. To tune the driver for optimal performance, set the following connection properties:
If your result sets do not exceed the site configured maximum number of rows
Set EnablePagingWithOrderByID to false.
If you know the typical fetch size for your application
Set FetchSize to suit your environment. Smaller fetch sizes can improve the initial response time of the query. Larger fetch sizes improve overall fetch times at the cost of additional memory.
If you want to compress data transferred between the driver and the Web service
Set WSCompressData to compress (default).
If you know how many rows of data the driver should fetch for each JDBC call made to the Web service
Set WSFetchSize to suit your environment. Setting to 0 fetches the site configured maximum number of rows for optimum throughput. To improve response time, you can set to a positive integer that is lower than the site configured maximum.
© 2015. Progress Software Corporation. All rights reserved.