Configure Artifactory to use Oracle

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
  1. Download and install the libaio library.

    #For example, on Ubuntu 24.04:
    sudo apt install libaio1t64
    #For example, on Redhat: 
    yum install libaio
  2. Copy the libaio directory 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 libaio directory 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
  3. 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 a mandatory requirement because the JFrog metadata service does not use the JDBC driver since its a Go application and not Java. Therefore, to support the connection between Artifactory and database, you would need to install the thin client (type 4) and the OCI (type 2).

  4. Extract the Oracle Instant Client and copy the OJDBC jar file to the $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib directory.

    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/var directory.

  5. Set the LD_LIBRARY_PATH, 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
  6. 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
    
    
  7. Start Artifactory.

  8. With Performance Optimization (Optional):

    For improved shift events performance, you can add the following configuration:

    shared:  
    database:    
    allowNonPostgresql: true    
    type: oracle    driver: oracle.jdbc.OracleDriver    
    url: jdbc:oracle:thin:@<your db server URL>/DBName    
    username: artifactory    
    password: password  
    shift:    
    events:      
    oracledb:        
    use:          
    pkey:            
    for:             
    delete:                
    temp:                  
    events: true
  9. (Optional) Optimize Shift Events Performance

    Property:artifactory.shift.events.oracledb.use.pkey.for.delete.temp.events

    For environments experiencing slow shift events processing, you can enable an Oracle-specific optimization that forces the use of the primary key index for DELETE operations on temporary node events.

    When to Enable:

    • Slow shift events processing

    • High database load during node events cleanup

    • Performance degradation during shift events operations

    Add the following to your system.yaml:

    shared:  
    shift:    
    events:      
    oracledb:        
    use:          
    pkey:            
    for:              
    delete:                
    temp:                  
    events: true

    Note

    This optimization applies only to Oracle database environments. Default value is false. Requires Artifactory restart to take effect.

Shift Events Performance Optimization (Oracle)

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

Configuration

shared:  
shift:    
events:      
oracledb:        
use:          
pkey:            
for:              
delete:                
temp:                  
events: true

When to Enable

  • Slow shift events processing

  • High database load when deleting temporary node events during shift events

  • Performance degradation during shift events operations

Note

Applies only to Oracle database environments

Has no effect on PostgreSQL, MySQL, MS SQL Server, or other databases

Requires Artifactory restart to take effect