Overriding the Default Oracle Database Connection Information
By default the database connection for Oracle databases is of the format:
jdbc:oracle:thin:@<hostname>:<dbport>:<database_sid>
where:
<hostname>
Database hostname.
<dbport>
Database Listener portname.
<database_sid>
Database Name.
This configuration setting is sufficient for the majority of the environments at a site. If your site requires a specialist URL for RAC support then you must override the default URL.
To override the default URL specify the following:
Log on to the server containing the business application server using the administration account for the desired environment (for example, splsys).
Execute the splenviron utility, with the –e option, to attach to the desired environment to change. See splenviron – Set Environment Variables for details.
Execute the configureEnv utility and choose to change menu block 4 (Database). See configureEnv – Set up Environment Settings for details.
Change the Database Override Connection String to the desired custom JDBC url.
Press p to save the change to the ENVIRON.INI.
Execute initialSetup with the –t option to reflect the change in the hibernate.properties files. This may overwrite custom changes if custom templates are not used. See initialSetup – Maintain Configuration Settings and Implementing Custom Templates.
Execute initialSetup with the –w option to include the configuration changes in the WAR/EAR files. This option is not required if externalization of configuration is implemented. See initialSetup – Maintain Configuration Settings and Using Configuration Files Outside the WAR/EAR File for details.
For selected platforms redeployment of the WAR/EAR files is required in accordance with the Business Application Server Deployment Process.
The following example uses the 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)
)
)
Refer to Oracle RAC Support for other examples.
Example URL using the 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 and for other platforms it is LD_LIBRARY_PATH.
Note: For Oracle Database 12.1 and above, use the format: jdbc:oracle:thin:@<hostname>:<dbport>:/<database_service> to use Pluggable Databases where <database service> is the PDB name.