Incorrect MS SQL Schema Used
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
Symptoms
Certain Jira functions may fail with SQL Exceptions.
Jira may fail to run altogether.
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
7
8
___ Database Configuration ________________
Loading entityengine.xml from : file:/C:/Data/Jira/atlassian-jira/WEB-INF/classes/entityengine.xml
Entity model field type name : mssql
Entity model schema name :
Database Version : Microsoft SQL Server - 10.50.2500
Database Driver : jTDS Type 4 JDBC Driver for MS SQL Server and Sybase - 1.2.4
Database URL : jdbc:jtds:sqlserver://sqlserver:1433/jiradb
Database JDBC config : mssql jdbc:jtds:sqlserver://sqlserver:1433/jiradb
Cause
This is either caused by an incorrect configuration when Jira is installed or this bug as tracked under JRASERVER-25329 - JIRA 4.4 MSSQL schema in dbconfig.xml does not get picked up by ./config.sh. In this case all tables will be stored on the root schema (dbo
), and occasionally other applications will store tables under this schema. Having a schema specifically for Jira can prevent something like this from occurring and we recommend fixing this immediately. Additionally, this can cause some failures with Active Objects, (e.g.: plugins such as GreenHopper, Tempo, Activity Streams).
WARNING: If the schema is missing altogether, it is absolutely critical that it is specified otherwise it will cause significant problems with the Jira instance.
Resolution
Stop Jira and point it to use the
dbo
schema.Start Jira and back it up using the XML export functionality as in Backing Up Data.
Create the required schema, as in Connecting Jira applications to a database, ensuring it has the correct permissions
Stop Jira.
Using the Jira application Configuration Tool update Jira to refer to the new schema (this should be
jiraschema
).Start Jira.
Restore the XML backup from step 2.
NOTE: This can also be done with the steps within Change the schema name for Jira database tables.
Was this helpful?