Getting error messages SQLServerException: Invalid object name in Jira

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

Problem

The following exception is logged while working with Jira in the atlassian-jira.log file.

1 2 Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name "productlicense". at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:256)

Environment

  • Microsoft SQL Server is used as database

Diagnosis

Check what is a default schema assigned to the database user used by Jira. Execute this SQL command on behalf of that user:

1 SELECT schema_name();

Cause

Database user used by Jira has a default schema as "dbo" or some other schema, and not Jira database schema. When this happens, and the server receives SQL commands that are not fully qualified tables names, the database server does not know in which schema to look up the tables, and will error out with "Invalid object name" message.

Solution

Resolution

Remap a correct default schema to the database user used by Jira (the schema name can be obtained via dbconfig.xml):

1 ALTER USER <jira_user> WITH DEFAULT_SCHEMA = jiraschema;

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.