You can update the default or custom JDBC drivers by packaging new drivers into a
compressed file and use the sc_drivers_url parameter to download them from an
accessible web server.
Before you begin
Note: Before you package the new JDBC driver files into a compressed file, you must make sure that the custom driver that you want to use is compatible with Java™ 11.
For Oracle, you must download the required JDBC JAR and other companion JAR files such as
orai18n.jar, oraclepki.jar,
osdt_core.jar, osdt_cert.jar from the Oracle Technology
Network JDBC Download Page
.
About this task
The default JDBC drivers are used by the internal data sources. If you want to use custom drivers
for the internal data sources, modify the CP4BA custom resource file to locate the custom driver
files hosted on a web server.
If you want to configure custom external data sources for the CP4BA applications, see the
following links:
Procedure
- Prepare all the new JDBC drivers for all the databases that are connected to your CP4BA
deployment. For more information, see Preparing customized
versions of JDBC drivers and ICCSAP libraries.
- Edit the Cloud Pak for Business Automation CR to add the
shared_configuration.sc_drivers_url parameter to download the required
drivers.zip file.
The following example shows the URL of the cp4ba-driver-http service.
shared_configuration:
sc_drivers_url: http://cp4ba-driver-http:8080/drivers.zip
The following patch command is one way to make the edit with the example
URL:
oc patch icp4aclusters <cr_name> --type='json' -p '[{"op": "replace", "path": "/spec/shared_configuration/sc_drivers_url", "value": "http://cp4ba-driver-http:8080/drivers.zip"}]'
- Optional: If your CR contains
application_engine_configuration instances, then set the
use_custom_jdbc_drivers parameter to
true.
application_engine_configuration:
- name: <instance>
use_custom_jdbc_drivers: true
- Optional: If the CR contains bastudio_configuration,
then you must add the use_custom_jdbc_drivers and
jdbc_driver_files parameters to the BAS database settings. If the
playback_server parameter exists, add the
use_custom_jdbc_drivers parameter in this section as well.
bastudio_configuration:
database:
use_custom_jdbc_drivers: true
jdbc_driver_files: <filenames>
playback_server:
use_custom_jdbc_drivers: true
Where <filenames> is a comma-separated list of provided driver file
names.
What to do next
If you created network policies for your CP4BA deployment, you must generate and reapply the
policies if you apply a new drivers URL.
Note: Make sure that a successful reconcile completes after the change to the drivers URL before you
generate new network policies.
For more information, see Installing network policies and Configuring cluster security.