On this page:
Please refer to the Atlassian documentation for the complete information on specific datasources. This page shows example settings of datasources.
Microsoft SQL Server
Configuring an SQL Server Datasource
Example:
Oracle
Configuring an Oracle Datasource for Confluence
Example
Configuring an Oracle Datasource for Jira
- Stop Jira.
- Download the Oracle JDBC Driver
https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/utilities_drivers/jdbc/122010/ojdbc8.jar
(you need to create an account) - Copy it to your Jira Folder: /opt/atlassian/jira/application/lib
- Edit the Server.xml: /opt/atlassian/jira/application/conf
a) In the server.xml file, locate the Context section (under Engine > Host):
<Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true"> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> <Manager pathname=""/> <JarScanner scanManifest="false"/> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" /> </Context>
b) Add a new resource name:
<Resource name="jdbc/oracle" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@<host>:1521:<SID>" username="<database-user>" password="<password>" connectionProperties="SetBigStringTryClob=true" accessToUnderlyingConnectionAllowed="true" maxTotal="60" maxIdle="20" maxWaitMillis="10000"/>
The final file will look like this:
Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true"> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> <Manager pathname=""/> <JarScanner scanManifest="false"/> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="120" /> <Resource name="jdbc/oracle" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@<host>:1521:<SID>" username="<database-user>" password="<password>" connectionProperties="SetBigStringTryClob=true" accessToUnderlyingConnectionAllowed="true" maxTotal="60" maxIdle="20" maxWaitMillis="10000"/> </Context>
5. Once this is done, start Jira.
MySQL
Configuring a MySQL Datasource
Example
PostgreSQL
Configuring a PostgreSQL Datasource
Example