Advanced Oracle JDBC Connection Support
By ACShorten on Apr 06, 2009
By default the connection string for the database used for the product is as per the JDBC standard and is in the format:
[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)
(SERVER = DEDICATED)
(SERVICE_NAME = SID.WORLD)
Example contents of dbconn_override.txt Oracle JDBC thick client:
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.