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