Progress DataDirect for JDBC for Oracle Driver Quick Start ·...

24
Progress DataDirect for JDBC for Oracle Driver Quick Start Release 6.0.0

Transcript of Progress DataDirect for JDBC for Oracle Driver Quick Start ·...

  • Progress DataDirect forJDBC for Oracle DriverQuick Start

    Release 6.0.0

  • Quick Start: Progress DataDirect for JDBCfor 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 followinginformation:

    • Driver and data source classes

    • Connection URL format

    Note: OEMCUSTOMERS: Refer to the Progress DataDirect for JDBCDrivers Distribution Guide for informationon 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 startBefore you get started, you need the following:

    • Appropriate user permissions to modify your environment and to read, write, and execute various files inthe DataDirect for JDBC installation directory .

    • Connection information:

    • Edition Name (Oracle 11g R2 and higher only): The name of the Oracle edition the driver uses whenestablishing a connection.

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

    https://www.progress.com/resources/documentation/datadirect-documentation

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

    • Service Name: The Oracle service name that specifies the database used for the connection. Theservice name is a string that is the global database name—a name that is comprised of the databasename 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 defaultis 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 yourdatabase.

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

    • Control Number

    • Serial Number

    Requirements and supportThe 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 ServiceVisit the following web pages for the latest support and certification information for the data sources supportedby the driver:

    • Release Notes

    • Supported Configurations

    • DataDirect Support Matrices

    Downloading the driverTo 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

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.04

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

    https://www.progress.com/jdbc/release-history/oracle-database-jdbchttps://www.progress.com/supported-configurations/https://www.progress.com/matrices/datadirecthttps://www.progress.com/trial-datadirect

  • • 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, clickDownload.

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

    See alsoInstalling the JDBC driver on page 5

    Installing the JDBC driverThis 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 informationon 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 requiredto use the drivers.

    1. Unzip the files to a temporary directory, maintaining the directory structure of the zip file. After extractingthe 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

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

    Installing the JDBC driver

  • Important: The Java installer can be run on most platforms, including Windows; however, if you run theJava installer onWindows, turn off User Account Controls or select a non-system directory as the installationdirectory. The Windows installer allows you to install the driver in the Program Files system directory onWindows 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 theWhereWould You Like to Install? field, type the path, includingthe drive letter, of the product installation directory or click the Choose button to browse to and select aninstallation 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 allavailable 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 ormultiple 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 theValidate button. You can add multiple keys consecutively.

    A tree menu of drivers with valid licenses appears in the selection box. For example, the following imagedemonstrates 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 removeinstalled drivers, you must uninstall the product.

    If you are installing a new version of a currently installed driver, the installer will overwrite the installed driverfiles with the newer version. To revert to an earlier version of the driver, you will need to uninstall the productand reinstall the desired version.

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

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.06

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

  • 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 reviseselections; or click Install to begin the installation.

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

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

    install_dir/lib/oracle.jar

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

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

    Data source and driver classesThe driver provides the following driver class:

    com.ddtek.jdbc.oracle.OracleDriver

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

    Setting the classpath

  • The driver provides the following data source class that supports the functionality for all JDBC specificationsand 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 tocom.ddtek.jdbcx.oracle.OracleDataSource; however, it is named after a data source class provided in earlierreleases, allowing applications that rely on the older version to use the driver without changes.

    Using connection propertiesYou can use connection properties to customize the driver for your environment. You can use these connectionproperties with either the JDBC DriverManager or a JDBC data source. For a DriverManager connection, aproperty 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 listof supported properties, refer to "Connection Property Descriptions" in the Progress DataDirect for JDBC forOracle Driver User's Guide

    The following table summarizes the minimum connection properties required to connect to a database. For alist 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

    CharacteristicProperty

    Specifies the TCP port of the primary database server that is listening forconnections to the database.

    The default is 1521.

    PortNumber

    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. Thisproperty is mutually exclusive with the SID property.ServiceName

    Oracle System Identifier that refers to the instance of the Oracle database runningon the server. This property is mutually exclusive with the ServiceName property.

    The default is ORCL.

    SID

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

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.08

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

    https://documentation.progress.com/output/DataDirect/jdbcoraclehelp/index.htmlhttps://documentation.progress.com/output/DataDirect/jdbcoraclehelp/index.html

  • Connecting to a DataSourceOnce the driver is installed and configured, you can connect from your application to your database in eitherof the following ways.

    • Using the JDBC DriverManager, by specifying the connection URL in theDriverManager.getConnection() method.

    • Creating a JDBC data source that can be accessed through the Java Naming Directory Interface (JNDI).

    Connecting using the DriverManagerOne way to connect to an Oracle database is through the JDBC DriverManager using theDriverManager.getConnection()method. As the following example shows, this method specifies a stringcontaining a connection URL.

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

    Passing the connection URLAfter setting the CLASSPATH, the required connection information needs to be passed in the form of aconnection 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.

    ExampleConnection conn = DriverManager.getConnection

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

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

    Connecting to a DataSource

    https://documentation.progress.com/output/DataDirect/jdbcoraclehelp/index.html

  • Testing a DriverManager ConnectionYou can also use DataDirect Test™ to establish and test a DriverManager connection. The screen shots inthis 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:

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.010

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

  • 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 Databases 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 correspondingfields.

    8. Click Connect.

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

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

    Connecting to a DataSource

  • For more information, see "DataDirect Test."

    Connecting using data sourcesA JDBC data source is a Java object, specifically a DataSource object, that defines connection informationrequired for a JDBC driver to connect to the database. Each JDBC driver vendor provides their own data sourceimplementation for this purpose. A Progress DataDirect data source is Progress DataDirect’s implementationof 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 sourcescan be created andmanaged separately from the applications that use them. Because the connection informationis defined outside of the application, the effort to reconfigure your infrastructure when a change is made isminimized. For example, if the database is moved to another database server, the administrator need onlychange the relevant properties of the DataSource object. The applications using the database do not needto change because they only refer to the name of the data source.

    How data sources are implementedData sources are implemented through a DataSource class. A DataSource class implements the followinginterfaces.

    • javax.sql.DataSource

    • javax.sql.ConnectionPoolDataSource (allows applications to use connection pooling)

    See alsoData source and driver classes on page 7

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.012

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

  • Creating data sourcesThe following example files provide details on creating and using Progress DataDirect data sources with theJava 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 sourceand 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 JDBCdata 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 sourceinformation. For a JNDI file system implementation, you must download the File System Service Provider fromthe 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 notrequired for LDAP implementations because the LDAP Service Provider has been included with Java SE sinceJava 2 SDK, v1.3.

    Example data sourceTo configure a data source using the example files, you will need to create a data source definition. The contentrequired 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 containsthe 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 defaultvalue.

    Optionally, you can configure the example application to print out the data source attributes. Note that this codeis specific to the driver and should only be used in the example application. For example, you would add thefollowing 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();}

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

    Connecting to a DataSource

    http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-plat-419418.html#7110-jndi-1.2.1-oth-JPR

  • Calling a data source in an applicationApplications can call a Progress DataDirect data source using a logical name to retrieve thejavax.sql.DataSource object. This object loads the specified driver and can be used to establish aconnection to the database.

    Once the data source has been registered with JNDI, it can be used by your JDBC application as shown in thefollowing 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 thelogical name of the data source (EmployeeDB). The Context.lookup() method returns a reference to aJava object, which is narrowed to a javax.sql.DataSource object. Then, theDataSource.getConnection() method is called to establish a connection.

    Testing a data source connectionYou can use DataDirect Test™ to establish and test a data source connection. The screen shots in this sectionwere 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:

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.014

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

  • 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:

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

    Connecting to a DataSource

  • 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 correspondingfields.

    8. Click Connect.

    If the connection information is entered correctly, the JDBC/Database Outputwindow reports that a connectionhas 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.016

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

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

    BatchMechanismPurpose:

    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 executebatch operations. The JDBC 3.0-compliant mechanism returns individual update counts for each statement orparameter set in the batch as required by the JDBC 3.0 specification. The native Oracle batch mechanismdoes 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) inthe returned update count array.

    Recommended Settings:

    If your application does not use update count information, performance can be improved by using the nativeOracle batch environment (BatchMechanism=nativeBatch).

    CatalogOptionsPurpose:

    Determines which type of metadata information is included in result sets when an application callsDatabaseMetaData methods.

    Performance Impact:

    It is expensive to retrieve information about synonyms, remarks, and Oracle collection data types. If yourapplication does not require this information, the driver can improve the performance of queries that callDatabaseMetaData methods.

    Recommended Settings:

    Set a value for this property based on the type of metadata information your application requires. To know thecomplete behavior of each of the valid values, see "CatalogOptions" in Progress DataDirect for JDBC for OracleDriver User's Guide.

    CommitBehaviorPurpose:

    Determines the redo log behavior. Typically, redo changes that are generated by update transactions arewritten to disk immediately when a transaction is committed, and the session waits for the disk write to completebefore returning control to the application.

    Performance Impact:

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

    Tuning for performance

    https://documentation.progress.com/output/DataDirect/jdbcoraclehelp/index.htmlhttps://documentation.progress.com/output/DataDirect/jdbcoraclehelp/index.html

  • Oracle 10g R2 or higher can let the log writer write the redo changes to disk in its own time instead of immediatelyand return control to the application before the disk write is complete instead of waiting. Not waiting for the diskwrite improves performance for applications that perform update operations and where data integrity is notcritical. For example, most banking applications cannot tolerate data loss in the event that the server has aproblem writing the redo changes to disk or fails during the process, but many logging applications for diagnosticpurposes can.

    Recommended Settings:

    If your application processes multiple update transactions simultaneously and data integrity is not critical, setto noWaitBatch for improved performance.

    DataIntegrityLevelPurpose:

    Determines the level of Oracle Advanced Security data integrity used for data sent between the driver anddatabase 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 additionaloverhead (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.

    EnableBulkLoadPurpose:

    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 loadbypasses the data parsing usually done by the database, providing an additional performance gain over batchoperations.

    Recommended Settings:

    If your application does not require a high level of data integrity, enable this option (EnableBulkLoad=true)for improved performance.

    EnableServerResultCachePurpose:

    Determines whether the driver enables Oracle’s server-side resultset caching feature, which stores the resultset 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 canimprove performance by using the Oracle feature server-side resultset caching. When enabled, Oracle storesthe result set in database memory. On subsequent executions of the same query, the result set is returnedfrom database memory if the underlying tables have not been modified. Without result set caching, the serverwould 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.

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.018

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

  • EncryptionMethodPurpose:

    Determines whether data is encrypted and decrypted when transmitted over the network between the driverand 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 performingdata integrity checks.

    Recommended Settings:

    If your application does not require data encryption, set to noEncryption for better performance.

    InsensitiveResultSetBufferSizePurpose:

    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 inmemory instead of writing it to disk. By default, the driver caches 2 MB of insensitive result set data in memoryand writes any remaining result set data to disk. Performance can be improved by increasing the amount ofmemory used by the driver before writing data to disk or by forcing the driver to never write insensitive resultset 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 amountof available memory. The maximum value for this property is 2 GB.

    LOBPrefetchSizePurpose:

    Specifies the size of prefetch data the driver returns for BLOBs and CLOBs. LOBPrefetchSize is supported forOracle 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 valueequal to or greater than 0). With LOBPrefetchSize property enabled, the driver can return LOB meta-data andthe beginning of LOB data along with the LOB locator during a fetch operation, thereby reducing the numberof round trips and improving performance.

    Recommended Settings:

    For better performance, specify a value that is large enough to entirely prefetch LOB values. This allows datato be available without having to go through LOB protocol, which can be expensive.

    MaxPooledStatementsPurpose:

    Specifies the maximum number of prepared statements to be pooled for each connection and enables thedriver’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 runningfrom within an application server or another application that provides its own statement pooling.

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

    Tuning for performance

  • Recommended Settings:

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

    RandomGeneratorPurpose:

    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 seedingof random numbers, it generally increases the processing time of operations, which affects the performanceadversely.

    Recommended Settings:

    If your environment does not require more secure seeding, set RandomGenerator to random to improveresponse times for your application.

    ResultSetMetaDataOptionsPurpose:

    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 driverto perform emulations to determine the correct table name for each column in the result set. This additionalprocessing can adversely affect performance.

    If set to 1 and the ResultSetMetaData.getTableName() method is called, the driver performs additional processingto determine the correct table name for each column in the result set. The driver returns schema name andcatalog name information when the ResultSetMetaData.getSchemaName() andResultSetMetaData.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 canimprove performance by setting this option to 0.

    SDUSizePurpose:

    Specifies the size in bytes of the Session Data Unit (SDU) that the driver requests when connecting to theserver. 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 thedatabase 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 thedatabase server. This reduces the total number of round trips required to return data to the client, thus improvingperformance. If your application returns small result sets, set this property to a size smaller than the maximumto avoid burdening your network with unnecessarily large packets.

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.020

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

  • ServerTypePurpose:

    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 toserve only your application connection. When you disconnect, the process goes away. The socket connectionis made directly between your application and this dedicated server process. This can provide considerableperformance improvements, but will use significantly more resources on UNIX servers. Because this is a threadon Oracle servers running on Windows platforms, the additional resource usage on the server is significantlyless.

    Recommended Settings:

    If you have a batch environment or a performance-sensitive application that would be degraded by sharingOracle 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.

    StringParamsMustMatchCharColumnsPurpose:

    Determines whether the driver uses ORA_CHAR or ORA_VARCHAR bindings for string parameters in aWhereclause.

    Performance Impact:Using ORA_VARCHAR bindings can improve performance, but may cause matching problems for CHARcolumns.

    Recommended Settings:

    If your application does not match string parameters against CHAR columns, set this property to false forthe driver to use ORA_VARCHAR bindings.

    Troubleshooting setup/connection issuesThis section describes common setup/connection issues you may encounter while trying to establish a databaseconnection with the driver as well as some potential reasons for these issues. If you are experiencing a problemnot 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.

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

    Troubleshooting setup/connection issues

    https://documentation.progress.com/output/DataDirect/jdbcoraclehelp/index.html

  • Common setup/connection issuesYou are experiencing a setup/connection issue if you are encountering an error or hang while you are tryingto make a database connection with the JDBC driver or are trying to configure the JDBC driver. Some commonerrors that are returned by the driver if you are experiencing a setup/connection issue include:

    • class not found

    • Specified driver could not be loaded.

    • Data source name not found and no default driver specified.

    • Unable to connect to destination.

    • Invalid username/password; logon denied.

    Troubleshooting the issueSome 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 yourCLASSPATH, you will receive a class not found exception when trying to load the driver. See "Settingthe 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 notcorrectly configured.

    See alsoSetting the classpath on page 7Connecting to a DataSource on page 9

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.022

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

  • Additional resourcesIn addition to this quick start, the following resources enable you to take full advantage of the features andsupport offered for your driver.

    • Product Documentation Library contains a comprehensive set of product documentation, including thefollowing guides:

    • Progress DataDirect for JDBCDrivers Installation Guide details requirements and procedures for installingthe product.

    • Progress DataDirect for JDBC for Oracle Driver User's Guide guides you through using and configuringthe driver, provides detailed reference information, and explains the tools used to troubleshoot commonproblems.

    • 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 supportProgress DataDirect offers a variety of options to meet your support needs. Please visit our Web site for moredetails 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 bulletinsand 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 acase number if you have been provided one for your issue. If you do not have a SupportLink contract, theSupportLink 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 fullinformation, 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 understandthe problem.

    • A brief description of the problem, including, but not limited to, any error messages you have received, whatsteps you followed prior to the initial occurrence of the problem, any trace logs capturing the issue, and soon. Depending on the complexity of the problem, you may be asked to submit an example or reproducibleapplication so that the issue can be re-created.

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

    Additional resources

    https://www.progress.com/resources/documentation/datadirect-documentationhttps://documentation.progress.com/output/DataDirect/jdbcinstallhelp/index.htmlhttps://documentation.progress.com/output/DataDirect/jdbcoraclehelp/index.htmlhttp://knowledgebase.progress.com/https://community.progress.com/https://www.progress.com/support

  • • A description of what you have attempted to resolve the issue. If you have researched your issue on Websearch engines, our Knowledgebase, or have tested additional configurations, applications, or other vendorproducts, 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 rightsreserved.These materials and all Progress® software products are copyrighted and all rights are reserved by ProgressSoftware Corporation. The information in these materials is subject to change without notice, and ProgressSoftware Corporation assumes no responsibility for any errors that may appear therein. The references in thesematerials to specific platforms supported are subject to change.

    Corticon, DataDirect (and design), DataDirect Cloud, DataDirect Connect, DataDirect Connect64, DataDirectXML 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, andWebSpeed are registered trademarks of Progress Software Corporation or one of its affiliates or subsidiariesin 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 aretrademarks 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 containedherein may be trademarks of their respective owners.

    Please refer to the readme applicable to the particular Progress product release for any third-partyacknowledgements required to be provided in the documentation associated with the Progress product.

    Progress DataDirect for JDBC for Oracle Driver: Quick Start: Version 6.0.024

    Chapter 1: Quick Start: Progress DataDirect for JDBC for Oracle Driver

    Quick Start: Progress DataDirect for JDBC for Oracle DriverBefore you startRequirements and supportDownloading the driverInstalling the JDBC driverSetting the classpathData source and driver classesUsing connection propertiesConnecting to a DataSourceConnecting using the DriverManagerPassing the connection URLTesting a DriverManager Connection

    Connecting using data sourcesHow data sources are implementedCreating data sourcesExample data source

    Calling a data source in an applicationTesting a data source connection

    Tuning for performanceTroubleshooting setup/connection issuesCommon setup/connection issuesTroubleshooting the issue

    Additional resourcesContacting technical support

    Copyright