JIRA Standalone: using an external database
| 
PDF |
JIRA Standalone uses the HSQL database engine for persistent storage of issues. This is
generally fine for light to medium usage, but for larger installs, you should preferably use an enterprise
database. Many companies do this in order to take advantage of existing database backup and recovery procedures.
Also, as HSQL stores all data in-memory (operations logged to disk in case of failure), there is an upper cap on
the amount of issue data that can be stored.
-
Add the JDBC driver jar for your database to the common/lib/ directory.
[oracle]
[mysql]
-
Edit conf/server.xml, and customize the username, password, driverClassName, and url parameters
for the Datasource:
<ResourceParams name="jdbc/JiraDS">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>username</name>
<value>sa</value>
</parameter>
<parameter>
<name>password</name>
<value>[enter db password]</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.hsqldb.jdbcDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:hsqldb:../database/tomcatdb</value>
</parameter>
</ResourceParams>
-
Edit atlassian-jira/WEB-INF/classes/entityengine.xml, and change the
field-type-name attribute to the value for your database:
<!-- DATASOURCE - You will need to update this tag for your installation.
1. Update field-type-name attribute to match your database.
Possible values include: postgres, postgres72, hsql, cloudscape,
mysql, mssql, oracle, sapdb
2. Choose with <jndi-jdbc> or <inline-jdbc> and update appropriately.
Either use a <jndi-jdbc> tag OR an <inline-jdbc> tag.
Comment out whichever tag you are not using.
-->
<datasource name="defaultDS" field-type-name="hsql"
...
| Obtain driver from | $ORACLE_HOME/jdbc/lib/ |
| jar name(s) |
classes12.zip (rename this!)
|
| driverClassName | oracle.jdbc.driver.OracleDriver |
| url example | jdbc:oracle:thin:@localhost:1526:jiradb |
Note
Tomcat expects jars in common/lib to have a .jar extension, so the classes12.zip
file should be renamed to class12.jar
Note
MySQL closes idle connection after 8 hours, so the autoReconnect=true is necessary to tell
the driver to reconnect