Progress DataDirect for JDBC for Oracle Driver Quick Start

Release 6.0.0

Quick Start: Progress DataDirect for JDBC for Oracle Driver

This quick start provides basic information that allows you to install, test, and tune the Progress® DataDirect® for JDBC™ for Oracle™ Driver. To take full advantage of the features and functionality available for your driver, refer to the Progress DataDirect Documentation Library. If you are already familiar with DataDirect drivers, you can begin using the driver immediately with the following information:

• Driver and data source classes • Connection URL format

Note: OEM CUSTOMERS: Refer to the Progress DataDirect for JDBC Drivers Distribution Guide for information on installing, branding, unlocking, and distributing your branded drivers.

This quick start covers the following topics:

• Before you start on page 3 • Requirements and support on page 4 • Downloading the driver on page 4 • Installing the JDBC driver on page 5 • Setting the classpath on page 7 • Data source and driver classes on page 7 • Using connection properties on page 8 • Connecting to a DataSource on page 9 • Tuning for performance on page 17 • Troubleshooting setup/connection issues on page 21 • Additional resources on page 23

Before you start

Before you get started, you need the following:

• Appropriate user permissions to modify your environment and to read, write, and execute various files in the DataDirect for JDBC installation directory . • Connection information: • Edition Name (Oracle 11g R2 and higher only): The name of the Oracle edition the driver uses when establishing a connection.

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 3 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

• Port Number: The port number of your Oracle listener. Check with your administrator for the number.

• Service Name: The Oracle service name that specifies the database used for the connection. The service name is a string that is the global database name—a name that is comprised of the database name and domain name, for example: sales.us.acme.com. or SID: The Oracle System Identifier that refers to the instance of Oracle running on the server. The default is ORCL.

• User and Password: The user name and password that are used to connect to your Oracle database. The user name and password are required only if user ID/password authentication is enabled on your database.

• For licensed installations, you will also need the following information that was provided by Progress DataDirect:

• Control Number • Serial Number

Requirements and support

The Progress® DataDirect® for JDBC™ for Oracle™ Driver supports the JDBC API for SQL read-write access to:

• Oracle Database • Oracle Autonomous Data Warehouse Cloud • Oracle Database Exadata Cloud Service • Oracle Database Cloud Service Visit the following web pages for the latest support and certification information for the data sources supported by the driver:

• Release Notes • Supported Configurations • DataDirect Support Matrices

Downloading the driver

To download the JDBC Oracle driver:

1. Visit the Progress DataDirect Connectors Download page. 2. Select any of the following data sources from the list:

• Oracle Database • Oracle Autonomous Data Warehouse Cloud

4 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Installing the JDBC driver

• Oracle Database Cloud Service

3. Select JDBC for the interface. 4. Select your OS when prompted for your OS and architecture. 5. Fill in the registration form with your contact information. 6. Review the End User License Agreement. If you agree, select the corresponding box; then, click Download.

The installer program has been downloaded. See "Installing the JDBC Driver" for detailed instructions.

See also Installing the JDBC driver on page 5

Installing the JDBC driver

This section provides instructions for installing your downloaded files using the GUI installer.

Note: OEM CUSTOMERS: Refer to the Progress DataDirect for JDBC Drivers Distribution Guide for information on installing, branding, unlocking, and distributing your branded drivers.

Note: Make sure that the Java Virtual Machine (JVM) is defined on your path. Java SE 6 or higher is required to use the drivers.

1. Unzip the files to a temporary directory, maintaining the directory structure of the zip file. After extracting the files, the temporary directory should have the following structure: Windows: PROGRESS_DATADIRECT_JDBC_INSTALL.exe PROGRESS_DATADIRECT_JDBC_COMMON_n.n.n_INSTALL.iam.zip PROGRESS_DATADIRECT_JDBC_DOCUMENTATION_n.n.n_INSTALL.iam.zip PROGRESS_DATADIRECT_JDBC_ORACLE_n.n.n_INSTALL.iam.zip Non-Windows: PROGRESS_DATADIRECT_JDBC_INSTALL.jar PROGRESS_DATADIRECT_JDBC_COMMON_n.n.n_INSTALL.iam.zip PROGRESS_DATADIRECT_JDBC_DOCUMENTATION_n.n.n_INSTALL.iam.zip PROGRESS_DATADIRECT_JDBC_ORACLE_n.n.n_INSTALL.iam.zip

2. From the installer directory, run the appropriate installer file to start the installer.

• Windows: PROGRESS_DATADIRECT_JDBC_INSTALL.exe • Non-Windows: PROGRESS_DATADIRECT_JDBC_INSTALL.jar

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 5 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

Important: The Java installer can be run on most platforms, including Windows; however, if you run the Java installer on Windows, turn off User Account Controls or select a non-system directory as the installation directory. The Windows installer allows you to install the driver in the Program Files system directory on Windows without turning off User Account Controls.

3. The Introduction window appears. Click Next. 4. The License Agreement window appears. Make sure that you read and understand the license agreement. To continue with the installation, select the I accept the terms in the License Agreement option; then, click Next. 5. The Install Directory window appears. In the Where Would You Like to Install? field, type the path, including the drive letter, of the product installation directory or click the Choose button to browse to and select an installation directory. Verify the installation directory. Click Next to continue. 6. Choose the type of installation to perform. Select one of the following options.

• Evaluation installation (will expire in 15 days). Select this option to install evaluation versions of all available drivers. Click Next to continue with the installation. Skip to Step 10 on page 7. • OEM or Licensed installation. Select this option if you have purchased a licensed version of one or multiple drivers. Click Next. If you are updating a currently installed driver, skip to Step 8 on page 6; otherwise, proceed to the next step.

7. Type the control number that was provided by Progress DataDirect in the Control# field, and click the Validate button. You can add multiple keys consecutively. A tree menu of drivers with valid licenses appears in the selection box. For example, the following image demonstrates an Apache Cassandra installation.

8. From the tree menu, select the drivers that you want to install. Click Next to continue. Drivers that are already installed will be listed under Drivers (Installed) and cannot be deselected. To remove installed drivers, you must uninstall the product. If you are installing a new version of a currently installed driver, the installer will overwrite the installed driver files with the newer version. To revert to an earlier version of the driver, you will need to uninstall the product and reinstall the desired version.

9. Enter name, company, and serial number in the fields provided. Click Next to continue.

6 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Setting the classpath

a) Type your name and company name into the corresponding fields. b) Type the serial number that was provided by Progress DataDirect.

10. The Pre-Installation Summary window appears. Review the installation information. Click Previous to revise selections; or click Install to begin the installation.

11. When the installation finishes, the Install Complete window appears. Click Done to exit the installer program.

Setting the classpath

The driver must be defined on your CLASSPATH before you can connect. The CLASSPATH is the search string your Java Virtual Machine (JVM) uses to locate JDBC drivers on your computer. If the driver is not defined on your CLASSPATH, you will receive a class not found or No suitable driver found exception when trying to load the driver. Set your system CLASSPATH to include the oracle.jar file as shown, where install_dir is the path to your product installation directory.

install_dir/lib/oracle.jar

Windows Example CLASSPATH=.;C:\Program Files\Progress\DataDirect\JDBC_60\lib\oracle.jar

UNIX Example CLASSPATH=.:/opt/Progress/DataDirect/JDBC_60/lib/oracle.jar

Data source and driver classes

The driver provides the following driver class: com.ddtek.jdbc.oracle.OracleDriver

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 7 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

The driver provides the following data source class that supports the functionality for all JDBC specifications and Java SE 6 or higher. com.ddtek.jdbcx.oracle.OracleDataSource

Note: For compatibility purposes, the driver also provides a second data sources class, com.ddtek.jdbcx.oracle.OracleDataSource40. This data source class functions identically to com.ddtek.jdbcx.oracle.OracleDataSource; however, it is named after a data source class provided in earlier releases, allowing applications that rely on the older version to use the driver without changes.

Using connection properties

You can use connection properties to customize the driver for your environment. You can use these connection properties with either the JDBC DriverManager or a JDBC data source. For a DriverManager connection, a property is expressed as a key value pair and takes the form property=value. For a data source connection, a property is expressed as a JDBC method and takes the form setProperty(value). For a complete list of supported properties, refer to "Connection Property Descriptions" in the Progress DataDirect for JDBC for Oracle Driver User's Guide The following table summarizes the minimum connection properties required to connect to a database. For a list of properties that affect performance, see "Tuning for Performance."

Note: All connection property names are case-insensitive. For example, Password is the same as password. Required properties are noted as such.

Table 1: Required properties

Property Characteristic

Specifies the TCP port of the primary that is listening for PortNumber connections to the database. The default is 1521.

Specifies the name or IP address of the server to which you want to connect. ServerName

Database service name that specifies the database used for the connection. This ServiceName property is mutually exclusive with the SID property.

Oracle System Identifier that refers to the instance of the Oracle database running SID on the server. This property is mutually exclusive with the ServiceName property. The default is ORCL.

See also Connecting using the DriverManager on page 9 Connecting using data sources on page 12 Tuning for performance on page 17

8 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Connecting to a DataSource

Connecting to a DataSource

Once the driver is installed and configured, you can connect from your application to your database in either of the following ways.

• Using the JDBC DriverManager, by specifying the connection URL in the DriverManager.getConnection() method. • Creating a JDBC data source that can be accessed through the Java Naming Directory Interface (JNDI).

Connecting using the DriverManager

One way to connect to an Oracle database is through the JDBC DriverManager using the DriverManager.getConnection() method. As the following example shows, this method specifies a string containing a connection URL.

jdbc:datadirect:oracle://server3:1521;SID=ORCL;User=test;Password=secret

Passing the connection URL After setting the CLASSPATH, the required connection information needs to be passed in the form of a connection URL.

jdbc:datadirect:oracle://hostname:port[;property=value[;...]]

where:

hostname

is the IP address or host name of the server to which you are connecting.

port

is the number of the TCP/IP port.

property=value

specifies connection properties.

Notes • Untrusted applets cannot open a socket to a machine other than the originating host. • You can specify connection properties using tnsnames.ora files too. See "Using tnsnames.ora files" in Progress DataDirect for JDBC for Oracle Driver User's Guide for more information.

Example

Connection conn = DriverManager.getConnection ("jdbc:datadirect:oracle://server3:1521; SID=ORCL;User=test;Password=secret");

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 9 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

Testing a DriverManager Connection You can also use DataDirect Test™ to establish and test a DriverManager connection. The screen shots in this section were taken on a Windows system. Take the following steps to establish a connection.

1. Navigate to the installation directory. The default location is:

• Windows systems: Program Files\Progress\DataDirect\JDBC_60\testforjdbc • UNIX and Linux systems: /opt/Progress/DataDirect/JDBC_60/testforjdbc

Note: For UNIX/Linux, if you do not have access to /opt, your home directory will be used in its place.

2. From the testforjdbc folder, run the platform-specific tool:

• testforjdbc.bat (on Windows systems) • testforjdbc.sh (on UNIX and Linux systems) The Test for JDBC Tool window appears:

3. Click Press Here to Continue. The main dialog appears:

10 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Connecting to a DataSource

4. From the menu bar, select Connection > Connect to DB. The Select A Database dialog appears:

5. Select the appropriate database template from the Defined field. 6. In the Database field, specify the ServerName, PortNumber, and SID for your Oracle data source. For example:

jdbc:datadirect:oracle://MyServer:1521;SID=ORCL

7. If you are using user ID/password authentication, enter your user ID and password in the corresponding fields. 8. Click Connect.

If the connection information is entered correctly, the JDBC/Database Output window reports that a connection has been established. (If a connection is not established, the window reports an error.)

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 11 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

For more information, see "DataDirect Test."

Connecting using data sources

A JDBC data source is a Java object, specifically a DataSource object, that defines connection information required for a JDBC driver to connect to the database. Each JDBC driver vendor provides their own data source implementation for this purpose. A Progress DataDirect data source is Progress DataDirect’s implementation of a DataSource object that provides the connection information needed for the driver to connect to a database. Because data sources work with the Java Naming Directory Interface (JNDI) naming service, data sources can be created and managed separately from the applications that use them. Because the connection information is defined outside of the application, the effort to reconfigure your infrastructure when a change is made is minimized. For example, if the database is moved to another database server, the administrator need only change the relevant properties of the DataSource object. The applications using the database do not need to change because they only refer to the name of the data source.

How data sources are implemented Data sources are implemented through a DataSource class. A DataSource class implements the following interfaces. • javax.sql.DataSource • javax.sql.ConnectionPoolDataSource (allows applications to use connection pooling)

See also Data source and driver classes on page 7

12 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Connecting to a DataSource

Creating data sources The following example files provide details on creating and using Progress DataDirect data sources with the Java Naming Directory Interface (JNDI), where install_dir is the product installation directory.

• install_dir/Examples/JNDI/JNDI_LDAP_Example.java can be used to create a JDBC data source and save it in your LDAP directory using the JNDI Provider for LDAP. • install_dir/Examples/JNDI/JNDI_FILESYSTEM_Example.java can be used to create a JDBC data source and save it in your local file system using the File System JNDI Provider. See "Example data source" for an example data source definition for the example files. To connect using a JNDI data source, the driver needs to access a JNDI data store to persist the data source information. For a JNDI file system implementation, you must download the File System Service Provider from the Oracle Technology Network Java SE Support downloads page, unzip the files to an appropriate location, and add the fscontext.jar and providerutil.jar files to your CLASSPATH. These steps are not required for LDAP implementations because the LDAP Service Provider has been included with Java SE since Java 2 SDK, v1.3.

Example data source To configure a data source using the example files, you will need to create a data source definition. The content required to create a data source definition is divided into three sections. First, you will need to import the data source class. For example:

import com.ddtek.jdbcx.oracle.OracleDataSource;

Next, you will need to set the values and define the data source. For example, the following definition contains the minimum properties required for a connection:

OracleDataSource mds = new OracleDataSource(); mds.setDescription("My Oracle Datasource"); mds.setServerName("MyServer"); mds.setUser("User123"); mds.setPassword("secret");

Note: If you do not specify a value for SID property, the driver automatically uses ORCL, as that's the default value.

Optionally, you can configure the example application to print out the data source attributes. Note that this code is specific to the driver and should only be used in the example application. For example, you would add the following section for a connection using only the minimum properties:

if (ds instanceof OracleDataSource) { OracleDataSource jmds = (OracleDataSource) ds; System.out.println("description=" + jmds.getDescription()); System.out.println("serverName=" + jmds.getServerName()); System.out.println("user=" + jmds.getUser()); System.out.println("password=" + jmds.getPassword()); System.out.println(); }

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 13 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

Calling a data source in an application Applications can call a Progress DataDirect data source using a logical name to retrieve the javax.sql.DataSource object. This object loads the specified driver and can be used to establish a connection to the database. Once the data source has been registered with JNDI, it can be used by your JDBC application as shown in the following code example.

Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("EmployeeDB"); Connection con = ds.getConnection("domino", "spark");

In this example, the JNDI environment is first initialized. Next, the initial naming context is used to find the logical name of the data source (EmployeeDB). The Context.lookup() method returns a reference to a Java object, which is narrowed to a javax.sql.DataSource object. Then, the DataSource.getConnection() method is called to establish a connection.

Testing a data source connection You can use DataDirect Test™ to establish and test a data source connection. The screen shots in this section were taken on a Windows system. Take the following steps to establish a connection.

1. Navigate to the installation directory. The default location is:

• Windows systems: Program Files\Progress\DataDirect\JDBC_60\testforjdbc • UNIX and Linux systems: /opt/Progress/DataDirect/JDBC_60/testforjdbc

Note: For UNIX/Linux, if you do not have access to /opt, your home directory will be used in its place.

2. From the testforjdbc folder, run the platform-specific tool:

• testforjdbc.bat (on Windows systems) • testforjdbc.sh (on UNIX and Linux systems) The Test for JDBC Tool window appears:

14 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Connecting to a DataSource

3. Click Press Here to Continue. The main dialog appears:

4. From the menu bar, select Connection > Connect to DB via Data Source. The Select A Database dialog appears:

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 15 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

5. Select a datasource template from the Defined Datasources field. 6. Provide the following information: a) In the Initial Context Factory, specify the location of the initial context provider for your application. b) In the Context Provider URL, specify the location of the context provider for your application. c) In the Datasource field, specify the name of your datasource.

7. If you are using user ID/password authentication, enter your user ID and password in the corresponding fields. 8. Click Connect.

If the connection information is entered correctly, the JDBC/Database Output window reports that a connection has been established. If a connection is not established, the window reports an error.

16 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Tuning for performance

Tuning for performance

The connection properties described in this section directly affect the performance of your driver. To tune for performance, configure your driver according to the recommended settings and your environment.

BatchMechanism Purpose: Determines the mechanism that is used to execute batch operations. Performance Impact: The driver can use a JDBC 3.0-compliant batch mechanism or the native Oracle batch mechanism to execute batch operations. The JDBC 3.0-compliant mechanism returns individual update counts for each statement or parameter set in the batch as required by the JDBC 3.0 specification. The native Oracle batch mechanism does not return individual update counts for each statement or parameter set in the batch. For this reason, when the native Oracle batch mechanism is used, the driver returns a value of SUCCESS_NO_INFO (-2) in the returned update count array. Recommended Settings: If your application does not use update count information, performance can be improved by using the native Oracle batch environment (BatchMechanism=nativeBatch).

CatalogOptions Purpose: Determines which type of metadata information is included in result sets when an application calls DatabaseMetaData methods. Performance Impact: It is expensive to retrieve information about synonyms, remarks, and Oracle collection data types. If your application does not require this information, the driver can improve the performance of queries that call DatabaseMetaData methods. Recommended Settings: Set a value for this property based on the type of metadata information your application requires. To know the complete behavior of each of the valid values, see "CatalogOptions" in Progress DataDirect for JDBC for Oracle Driver User's Guide.

CommitBehavior Purpose: Determines the redo log behavior. Typically, redo changes that are generated by update transactions are written to disk immediately when a transaction is committed, and the session waits for the disk write to complete before returning control to the application. Performance Impact:

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 17 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

Oracle 10g R2 or higher can let the log writer write the redo changes to disk in its own time instead of immediately and return control to the application before the disk write is complete instead of waiting. Not waiting for the disk write improves performance for applications that perform update operations and where data integrity is not critical. For example, most banking applications cannot tolerate data loss in the event that the server has a problem writing the redo changes to disk or fails during the process, but many logging applications for diagnostic purposes can. Recommended Settings: If your application processes multiple update transactions simultaneously and data integrity is not critical, set to noWaitBatch for improved performance.

DataIntegrityLevel Purpose: Determines the level of Oracle Advanced Security data integrity used for data sent between the driver and database server. The connection fails if the database server does not have a compatible integrity algorithm. Performance Impact: Checking data integrity can reduce performance on both the client and the server because of the additional overhead (mainly CPU usage) that is required to perform the check. Recommended Settings: If your application does not require a high level of data integrity, set to rejected for better performance.

EnableBulkLoad Purpose: Specifies whether the driver uses the native bulk load protocols for batch inserts.. Performance Impact: For batch inserts, the driver can use native bulk load protocols instead of the batch mechanism. Bulk load bypasses the data parsing usually done by the database, providing an additional performance gain over batch operations. Recommended Settings: If your application does not require a high level of data integrity, enable this option (EnableBulkLoad=true) for improved performance.

EnableServerResultCache Purpose: Determines whether the driver enables Oracle’s server-side resultset caching feature, which stores the result set in database memory so that it can be reused. Performance Impact: If your application connects to Oracle 11g or higher and executes the same query multiple times, you can improve performance by using the Oracle feature server-side resultset caching. When enabled, Oracle stores the result set in database memory. On subsequent executions of the same query, the result set is returned from database memory if the underlying tables have not been modified. Without result set caching, the server would process the query and formulate a new result set. Recommended Settings: If your application requires the same query to be executed multiple times, enable server-side resultset caching (EnableServerResultCache=true) for improved performance.

18 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Tuning for performance

EncryptionMethod Purpose: Determines whether data is encrypted and decrypted when transmitted over the network between the driver and database server. Performance Impact: Data encryption may adversely affect performance because of the additional overhead (mainly CPU usage) required to encrypt and decrypt data. Using data encryption can degrade performance more than performing data integrity checks. Recommended Settings: If your application does not require data encryption, set to noEncryption for better performance.

InsensitiveResultSetBufferSize Purpose: Determines the amount of memory that is used by the driver to cache insensitive result set data. Performance Impact: To improve performance when using scroll-insensitive result sets, the driver can cache the result set data in memory instead of writing it to disk. By default, the driver caches 2 MB of insensitive result set data in memory and writes any remaining result set data to disk. Performance can be improved by increasing the amount of memory used by the driver before writing data to disk or by forcing the driver to never write insensitive result set data to disk. The maximum cache size setting is 2 GB. Recommended Settings: Specify a value in KB that is a power of 2 for improved performance. This value should not exceed the amount of available memory. The maximum value for this property is 2 GB.

LOBPrefetchSize Purpose: Specifies the size of prefetch data the driver returns for BLOBs and CLOBs. LOBPrefetchSize is supported for Oracle database versions 12.1.0.1 and higher. Performance Impact: You can improve performance when fetching LOBs by enabling the LOBPrefetchSize property (set to a value equal to or greater than 0). With LOBPrefetchSize property enabled, the driver can return LOB meta-data and the beginning of LOB data along with the LOB locator during a fetch operation, thereby reducing the number of round trips and improving performance. Recommended Settings: For better performance, specify a value that is large enough to entirely prefetch LOB values. This allows data to be available without having to go through LOB protocol, which can be expensive.

MaxPooledStatements Purpose: Specifies the maximum number of prepared statements to be pooled for each connection and enables the driver’s internal prepared statement pooling when set to an integer greater than zero (0). Performance Impact: The driver’s internal prepared statement pooling provides performance benefits when the driver is not running from within an application server or another application that provides its own statement pooling.

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 19 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

Recommended Settings: For better performance, specify a value that is greater than the number of prepared statements used by the application. Note that this performance benefit comes at the expense of greater memory consumption.

RandomGenerator Purpose: Specifies the type of random number generator the database uses for secure seeding. Performance Impact: By default, RandomGenerator is set to secureRandom. While secureRandom offers more secure seeding of random numbers, it generally increases the processing time of operations, which affects the performance adversely. Recommended Settings: If your environment does not require more secure seeding, set RandomGenerator to random to improve response times for your application.

ResultSetMetaDataOptions Purpose: Determines whether the driver returns table name information in the ResultSet metadata for Select statements. Performance Impact: Returning table name information using the ResultSetMetaData.getTableName() method requires the driver to perform emulations to determine the correct table name for each column in the result set. This additional processing can adversely affect performance. If set to 1 and the ResultSetMetaData.getTableName() method is called, the driver performs additional processing to determine the correct table name for each column in the result set. The driver returns schema name and catalog name information when the ResultSetMetaData.getSchemaName() and ResultSetMetaData.getCatalogName() methods are called if the driver can determine that information. Recommended Settings: If your application does not require returning table name information in the ResultSet metadata , you can improve performance by setting this option to 0.

SDUSize Purpose: Specifies the size in bytes of the Session Data Unit (SDU) that the driver requests when connecting to the server. The SDU is equivalent to the maximum size of database protocol packets sent across the network. This property serves only as a suggestion to the database server. The actual SDU is negotiated with the database server. Performance Impact: To optimize performance, set this property based on the size of result sets returned by your application. Recommended Settings: If your application returns large result sets, set this property to the maximum SDU size configured on the database server. This reduces the total number of round trips required to return data to the client, thus improving performance. If your application returns small result sets, set this property to a size smaller than the maximum to avoid burdening your network with unnecessarily large packets.

20 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Troubleshooting setup/connection issues

ServerType Purpose: Specifies whether the connection is established using a shared or dedicated server process (UNIX) or thread (Windows). Performance Impact: When using a dedicated server connection, a server process on UNIX (a thread on Windows) is created to serve only your application connection. When you disconnect, the process goes away. The socket connection is made directly between your application and this dedicated server process. This can provide considerable performance improvements, but will use significantly more resources on UNIX servers. Because this is a thread on Oracle servers running on Windows platforms, the additional resource usage on the server is significantly less. Recommended Settings: If you have a batch environment or a performance-sensitive application that would be degraded by sharing Oracle resources with other applications, set this property to dedicated. With lower numbers of connections, your Oracle server has excess processing capacity and memory available when at maximum load.

StringParamsMustMatchCharColumns Purpose: Determines whether the driver uses ORA_CHAR or ORA_VARCHAR bindings for string parameters in a Where clause. Performance Impact: Using ORA_VARCHAR bindings can improve performance, but may cause matching problems for CHAR columns. Recommended Settings: If your application does not match string parameters against CHAR columns, set this property to false for the driver to use ORA_VARCHAR bindings.

Troubleshooting setup/connection issues

This section describes common setup/connection issues you may encounter while trying to establish a database connection with the driver as well as some potential reasons for these issues. If you are experiencing a problem not described in this section, comprehensive troubleshooting resources are available in the "Troubleshooting" section of the Progress DataDirect for JDBC for Oracle Driver User's Guide.

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 21 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

Common setup/connection issues

You are experiencing a setup/connection issue if you are encountering an error or hang while you are trying to make a database connection with the JDBC driver or are trying to configure the JDBC driver. Some common errors that are returned by the driver if you are experiencing a setup/connection issue include: • class not found • Specified driver could not be loaded. • not found and no default driver specified. • Unable to connect to destination. • Invalid username/password; logon denied.

Troubleshooting the issue

Some common reasons that setup/connection issues occur are:

• The database and/or listener are not started. • The driver jar file, oracle.jar, is not defined on your CLASSPATH. If the driver is not defined on your CLASSPATH, you will receive a class not found exception when trying to load the driver. See "Setting the classpath" for details. • The JDBC driver’s connection properties are not set correctly in the connection URL or data source. See "Configuring a data source" for more information. For example, the host name or port number are not correctly configured.

See also Setting the classpath on page 7 Connecting to a DataSource on page 9

22 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 Additional resources

Additional resources

In addition to this quick start, the following resources enable you to take full advantage of the features and support offered for your driver. • Product Documentation Library contains a comprehensive set of product documentation, including the following guides: • Progress DataDirect for JDBC Drivers Installation Guide details requirements and procedures for installing the product. • Progress DataDirect for JDBC for Oracle Driver User's Guide guides you through using and configuring the driver, provides detailed reference information, and explains the tools used to troubleshoot common problems.

• Progress Support Knowledgebase provides answers to questions, access to technical documentation, release notes, product alerts and other support information. • Progress Community allows you to contribute, share, and network with other Progress users and employees. • Technical Support provides technical support services, including maintenance services and opening a support case.

Contacting technical support

Progress DataDirect offers a variety of options to meet your support needs. Please visit our Web site for more details and for contact information: https://www.progress.com/support The Progress DataDirect Web site provides the latest support information through our global service network. The SupportLink program provides access to support contact details, tools, patches, and valuable information, including a list of FAQs for each product. In addition, you can search our Knowledgebase for technical bulletins and other information. When you contact us for assistance, please provide the following information:

• Your number or the serial number that corresponds to the product for which you are seeking support, or a case number if you have been provided one for your issue. If you do not have a SupportLink contract, the SupportLink representative assisting you will connect you with our Sales team. • Your name, phone number, email address, and organization. For a first-time call, you may be asked for full information, including location. • The Progress DataDirect product and the version that you are using. • The type and version of the operating system where you have installed your product. • Any database, database version, third-party software, or other environment information required to understand the problem. • A brief description of the problem, including, but not limited to, any error messages you have received, what steps you followed prior to the initial occurrence of the problem, any trace logs capturing the issue, and so on. Depending on the complexity of the problem, you may be asked to submit an example or reproducible application so that the issue can be re-created.

Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0 23 Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

• A description of what you have attempted to resolve the issue. If you have researched your issue on Web search engines, our Knowledgebase, or have tested additional configurations, applications, or other vendor products, you will want to carefully note everything you have already attempted. • A simple assessment of how the severity of the issue is impacting your organization.

Copyright

© 2018 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.

These materials and all Progress® software products are copyrighted and all rights are reserved by Progress Software Corporation. The information in these materials is subject to change without notice, and Progress Software Corporation assumes no responsibility for any errors that may appear therein. The references in these materials to specific platforms supported are subject to change. Corticon, DataDirect (and design), DataDirect Cloud, DataDirect Connect, DataDirect Connect64, DataDirect XML Converters, DataDirect XQuery, DataRPM, Deliver More Than Expected, Icenium, Kendo UI, NativeScript, OpenEdge, Powered by Progress, Progress, Progress Software Developers Network, Rollbase, SequeLink, Sitefinity (and Design), SpeedScript, Stylus Studio, TeamPulse, Telerik, Telerik (and Design), Test Studio, and WebSpeed are registered trademarks of Progress Software Corporation or one of its affiliates or subsidiaries in the U.S. and/or other countries. Analytics360, AppServer, BusinessEdge, DataDirect Spy, SupportLink, DevCraft, Fiddler, JustAssembly, JustDecompile, JustMock, Kinvey, NativeScript Sidekick, OpenAccess, ProDataSet, Progress Results, Progress Software, ProVision, PSE Pro, Sitefinity, SmartBrowser, SmartComponent, SmartDataBrowser, SmartDataObjects, SmartDataView, SmartDialog, SmartFolder, SmartFrame, SmartObjects, SmartPanel, SmartQuery, SmartViewer, SmartWindow, and WebClient are trademarks or service marks of Progress Software Corporation and/or its subsidiaries or affiliates in the U.S. and other countries. Java is a registered trademark of Oracle and/or its affiliates. Any other marks contained herein may be trademarks of their respective owners. Please refer to the readme applicable to the particular Progress product release for any third-party acknowledgements required to be provided in the documentation associated with the Progress product.

24 Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.0