« Single Sign On Whitepaper available | Main | Technical Whitepaper List: March 2009 »

Advanced Oracle JDBC Connection Support

By default the connection string for the database used for the product is as per the JDBC standard and is in the format:

jdbc:oracle:thin:@[hostname]:[dbport]:[database]

where
[hostname] - Database hostname
[dbport] - Database Listener portname
[database] - Database Name

The URL format is described in the Oracle JDBC documentation.

This configuration setting is sufficient for the majority of the environments at a site. If your site requires a specialist URL, for RAC support (for example) then you must override the default URL.

To enable the use of this functionality, you must install Patch 7924537 (for V2.2 customers)/7534052 (for V2.1 customers) from Metalink

After installing the patch, you can create a file called dbconn_override.txt in the environment under the $SPLEBASE\etc for Linux/UNIX (or %SPLEBASE%/etc for Windows) folder containing the override string. This setting will replace the database connection URL used by all modes of access at configuration time.

To reflect the change into the product you must:

  • Execute configureEnv[.sh] to detect the override file when using the "p" option to process the configuration file. Note: The dbconn_override.txt must exist each time you run configureEnv[.sh]
  • Execute initialSetup[.sh] to place the override in the appropriate hibernate.properties files. Note: When running initialSetup[.sh] any manual customization (outside of the normal configuration process) will need to be manually reapplied.
  • Redeploy the Web Applications using the appropriate deploy commands. These are a few examples of database connection overrides.

Example contents of dbconn_override.txt using Oracle JDBC thin client (for Oracle Real Application Clustering):

jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = machine-name)(PORT = 1251))
(ADDRESS = (PROTOCOL = TCP)(HOST = machine-name)(PORT = 1251)
(LOAD_BALANCE = yes)
(FAILOVER=YES)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SID.WORLD)
)
)

Example contents of dbconn_override.txt Oracle JDBC thick client:

jdbc:oracle:oci:@SID.WORLD

Note: For thick client to work, the Oracle client library directory must be added to the library search path. Oracle client libraries are installed under $ORACLE_HOME/lib and ORACLE_HOME/lib32 directories. Add this directory to the library search path environment variable. The library search path environment for AIX is LIBPATH, for HP-UX is SH_LIB_PATH for Linux is LD_LIBRARY_PATH and for Windows is PATH.

Comments (2)

That's a great way to use JDBC Connection.

hs jo:

check your db connection

Post a comment

About This Entry

This page contains a single entry from the blog posted on April 6, 2009 10:14 AM.

The previous post in this blog was Single Sign On Whitepaper available.

The next post in this blog is Technical Whitepaper List: March 2009.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle