This document contains answers to the most frequently asked questions about Oracle's Universal Connection Pool(UCP). Note that these address specific technical questions only and are used to document solutions to frequent customer questions as well as any known problems. The server docs (including JDBC doc) are also available online.
UCP FAQ page is totally a new page aimed at answering all the questions related to UCP. The purpose is to make using UCP easier and describe its strong capabilities.Back to Top
UCP is the Universal Connection Pool. It is a single connection pool that handles all kinds of connections, JDBC, JCA, LDAP, and others. It supports non-Oracle JDBC drivers and JDBC connections to non-Oracle databases. When used for Oracle JDBC connections to Oracle databases it provides all the features of the old JDBC Implicit Connection Cache, and more. UCP is widely used in Oracle products. We recommend using UCP for its capabilities to handle fail-over gracefully, managing connections, resources and many other reasons.Back to Top
UCP is a standalone jar file. It is named as ucp.jar. It is not included in the JDBC jar file.
Back to Top
Please download the required version of UCP jar files from the Oracle Technology Network JDBC, UCP & SQLJ Download Page.Back to Top
Please refer to the UCP Reference Guide for more details.Back to Top
UCP can be used with any application containers such as Apache Tomcat, IBM Websphere, JBOSS, Weblogic etc.,Back to Top
UCP does work with Weblogic. However, you should be using "Active Grid Link" which is from oracle and has all similar functionalitiesBack to Top
Current supported versions of ucp.jar file are 12.2, 12.1, 11.1, and 11.2Back to Top
Prior to 12c (i.e., 188.8.131.52.0), UCP could work with any version of Oracle JDBC driver. With the new pool, UCP 184.108.40.206, it is dependent on Oracle JDBC driver 220.127.116.11. Example: 18.104.22.168 ucp.jar requires ojdbc8.jar from 22.214.171.124. Our recommendation is to keep both ucp.jar and JDBC drivers from the same version.Back to Top
Database version compatibility comes from the JDBC driver version, but not UCP version. UCP jar file should be compatible with the JDBC driver version.Back to Top
UCP for JDBC provides a pool-enabled data source that is used by applications to borrow connections from a UCP JDBC connection pool. Below are the steps involved.
(1) Get an instance of Poll enabled datasource
PoolDataSource pds = PoolDataSourceFactory.getPoolDataSource();
(2) Set the connection properties that are required to get a physical connection to a database.
(3) Set any pool properties in order to override the connection pool's default behavior.
Oracle Notification Server (ONS) uses a simple publish/subscribe method to produce and deliver event messages for both local and remote consumption. ONS daemons run locally sending messages to and receiving messages from a configured list of nodes (where other ONS daemons are active). Advanced Oracle Database features, such as Oracle Real Application Clusters(RAC) and Fast Connection Failover(FCF) require ons.jar that is included in the Oracle Client software.Back to Top
ONS is a jar file called as ons.jar. Please include this in the classpath and wherever the JDBC & UCP jar files are locatedBack to Top
ONS configuration is controlled by a configuration file (ons.config) located at ORACLE_HOME/opmn/conf/ons.config. Configuration information within ons.config is defined through name/value pairs. It should contain
localport: the port that ONS binds to on the localhost interface to talk to local clients.
remoteport:the port that ONS binds to on all interfaces for talking to other remote ONS daemons
nodes:a list of other ONS daemons to talk to specified as either hostnames or IP addresses plus ports
# First three values are required
nodes=racnode1:4200, racnode2:4200, racnode3:4200
ONS only distinguishes between "local" and "remote" ports i.e., "localport=" and "remoteport=" in the ONS config. Usually, it will be 6100 and 6200. However, these do not have to be 6100 and 6200. Customer can configure these to be any port number, as long as they are consistently set up on both the ONS client and server hosts.Back to Top
ONS ports need to be changed at client and server side.
Client side: Change the localport, remoteport present in the ons.config file.
Server side: User SRVCTL command to Modify the ports used by the Oracle Notification Service daemon that is registered with Oracle Restart.
srvctl modify ons [-l ons_local_port] [-r ons_remote_port] [-t host[:port][,host[:port]][...]] [-v]
Use the below commands to monitor if ONS is running.
$srvctl status nodeapps |grep ONS
ONS is enabled
ONS daemon is running on node:
ONS daemon is running on node:
ONS daemon is not running on node:
$srvctl config nodeapps | grep ONS
ONS exists: Local port 6100, remote port 6200, EM port 0, Uses SSL false
ONS is enabled
ONS is explicitly enabled on nodes:
ONS is explicitly disabled on nodes:
$onsctl debug or onsctl ping
Work load balancing is distribution of work load to provide optimal performance for users and applications. In RAC aware applications, when a new node/instance is added/removed from a service, the work load should get balanced in both situations without any manual intervention. Number of database connections should get distributed between the available instances all the time.Back to Top
RAC, GDS emit load balancing advisories showing the CPU utilization of each of the active instances.Back to Top