How to Connect JIRA to ORACLE Using Service Name

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

The content on this page relates to platforms which are not supported. Consequently, Atlassian Support cannot guarantee providing any support for it. Please be aware that this material is provided for your information only and using it is done so at your own risk.

Solution

Description

In many configurations it is needed to connect using the Service names configured in TNSNAMES.ora file to connect JIRA to ORACLE. The Tnsnames.ora is the file which can be used to store database connect parameters of one or more Oracle servers and databases. It can also be used to configure database connection load balancing and/or failover.

This is how this file usually looks like:

1 2 3 4 5 6 7 8 9 10 11 <DATABASENAME>.WORLD = (DESCRIPTION = (ADDRESS_LIST= (LOAD_BALANCE=on)(FAILOVER=ON) (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER01)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER02)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = DBSERVER03)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = <SERVICENAME>) ) )

How to configure

  1. Edit the setenv.sh (for Linux) or seten.bat (for Windows) and add this property at JVM_SUPPORT_RECOMMENDED_ARGS:

    1 -Doracle.net.tns_admin=/path_to_file

    ℹ️ Where /path_to_file points to the folder where this file is located, not the file itself.

  2. Edit the dbconfig.xml file and set the JDBC url using this format:

    1 jdbc:oracle:thin:@DATABASENAME.WORLD

    A sample dbconfig.xml is given below:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  <?xml version="1.0" encoding="UTF-8"?> <jira-database-config> <name>TEST_JIRA</name> <delegator-name>default</delegator-name> <database-type>oracle10g</database-type> <jdbc-datasource> <url>jdbc:oracle:thin:@//Server:Port/Service_NAME</url> <driver-class>oracle.jdbc.OracleDriver</driver-class> <username>USERNAME</username> <password>PASSWORD</password> <pool-min-size>20</pool-min-size> <pool-max-size>20</pool-max-size> <pool-max-wait>30000</pool-max-wait> <pool-max-idle>20</pool-max-idle> <pool-remove-abandoned>true</pool-remove-abandoned> <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout> <validation-query>select 1 from dual</validation-query> <min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis> <time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis> <pool-test-while-idle>true</pool-test-while-idle> </jdbc-datasource> </jira-database-config>
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.