Configure Artifactory to use Oracle
- Download and install the libaio library. example:
-
Download and install the
libaiolibrary. For example:-
On Ubuntu 24.04:
sudo apt install libaio1t64 -
On Redhat:
yum install libaio
-
-
Copy the
libaiodirectory to the Artifactory Tomcat lib directory,$JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib.Create the Tomcat lib directory if it doesn't exist.
The
libaiodirectory name varies between environments. The following example shows an RHEL environment.cp -rp /usr/lib64/libaio.so.1 $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib -
Download the Oracle Instant Client lib for the environment in which your Artifactory runs.
For example, if Artifactory runs on a Docker environment on MacOS, download the Oracle Instant Client lib for Linux.
Note
Oracle Instant Client is required because the JFrog metadata service is a Go application, and does not use the JDBC driver. To support the connection between Artifactory and database, you would need to install the thin client (type 4) and the OCI (type 2).
-
Extract the Oracle Instant Client and copy the OJDBC jar file to the
$JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/libdirectory.The name of the OJDBC jar files varies between environments. In RHEL 8, the the OJDBC jar file
ojdbc8.jar.
Permissions
Make sure your driver has the same permissions as the rest of the files in the
$JFROG_HOME/artifactory/vardirectory.
-
Set the LD_LIBRARY_PATH variable in the Artifactory System YAML to point to the extracted Oracle Instant Client directory.
shared: env: LD_LIBRARY_PATH: <Path to Artifactory Tomcat lib directory>:<Oracle Instant Client directory path>For example:
shared: env: LD_LIBRARY_PATH: /opt/jfrog/artifactory/var/bootstrap/artifactory/tomcat/lib:/opt/jfrog/artifactory/var/bootstrap/artifactory/instant_client -
Set the DB connection details in the Artifactory System YAML . For example:
shared: database: allowNonPostgresql: true type: oracle driver: oracle.jdbc.OracleDriver url: jdbc:oracle:thin:@<your db server URL>/DBName #For example: localhost:1521/arty username: artifactory password: password -
Start Artifactory.
Performance Optimization
When Oracle deployments experience slow shift events processing, enable the artifactory.shift.events.oracledb.use.pkey.for.delete.temp.events system property to optimize DELETE operations on temporary node events. This Oracle-specific optimization forces use of the primary key index for DELETE operations on temporary node events. This can significantly reduce database load during shift events cleanup.
When to Enable:
- Slow shift events processing
- High database load during node events cleanup
- Performance degradation during shift events operations
Note
This optimization only effects Oracle database environments. You must restart the Artifactory service for changes to take effect.
Property: artifactory.shift.events.oracledb.use.pkey.for.delete.temp.events
Description: During shift events processing, Artifactory deletes temporary node events from the node_events_tmp table. By default, Oracle's query optimizer automatically selects which index to use. When enabled, this property explicitly instructs Oracle DB to use the primary key index (node_events_tmp_pk) for DELETE operations.
Default Value: False
ConfigurationAdd the following to your system.yaml:
shared:
shift:
events:
oracledb:
use:
pkey:
for:
delete:
temp:
events: trueUpdated 2 days ago
