Documentation for JIRA 4.0. Documentation for other versions of JIRA is available too.
Please note, although HSQLDB is bundled with JIRA Standalone we do not recommend it for production use. See Connecting JIRA to a Database for more information. Please consider using one of the recommended databases instead.
On this page:
If you are already using JIRA, create an export of your data as an XML backup. You will then be able to transfer data from your old database to your new database, as described in Switching databases.
common/lib/
directory.conf/server.xml
(if you are using JIRA Standalone) and customise the username
, password
, driverClassName
, url
, minEvictableIdleTimeMillis
and timeBetweenEvictionRunsMillis
parameters for the Datasource. (If you are using JIRA WAR/EAR, edit the appropriate file on your application server; e.g. for Tomcat, edit conf/Catalina/localhost/jira.xml
.)
<Server port="8005" shutdown="SHUTDOWN"> <Service name="Catalina"> <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false"> <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="sa" password="" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:/path/to/jira/database/jiradb" minEvictableIdleTimeMillis="4000" timeBetweenEvictionRunsMillis="5000" maxActive="20" /> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/> </Context> </Host> </Engine> </Service> </Server>
conf/
.)
In Tomcat 5.x, use 'jdbc:hsqldb:${catalina.home}/database/jiradb
' and '${catalina.home
}' will be replaced with the JIRA path at runtime.
atlassian-jira/WEB-INF/classes/entityengine.xml
(if you are using JIRA Standalone) or edit-webapp/WEB-INF/classes/entityengine.xml
(JIRA WAR/EAR), and change the field-type-name
attribute to hsql
. (If you forget to do this and start JIRA, it may create database tables incorrectly. See this page if this happens to you).
<!-- DATASOURCE - You will need to update this tag for your installation. --> <datasource name="defaultDS" field-type-name="hsql" helper-class="org.ofbiz.core.entity.GenericHelperDAO" check-on-start="true" use-foreign-keys="false" ...
If you are using JIRA WAR/EAR, your application server may require other changes to entityengine.xml
(e.g. to customise the jndi-jdbc
tag).
You should now have an application server configured to connect to a database, and JIRA configured to use the correct database type. If you are using JIRA Standalone, start it up and watch the logs for any errors. If you are using the JIRA WAR/EAR distribution, rebuild and redeploy the webapp in your application server.
Have experiences to share with HSQL and JIRA? We welcome your thoughts. Please see the user-contributed HSQL notes.