Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-65769

Upgrade task for Denormalised Space Permissions fails due to multiple prefixes(MSSQL)

XMLWordPrintable

      Problem

      If the database name in a Microsoft SQL Server 2017 database has multiple prefixes, the upgrade will fail for Confluence 7.11.0.

      Example: confluence.company.com.dbo.SPACES

      Environment

      • Confluence 7.9.3 upgrading to Confluence 7.12.0
      • Microsoft SQL Server 2017

      Steps to Reproduce

      1. Install Confluence 7.9.3 with Microsoft SQL Server 2017
      2. Upgrade to Confluence 7.11.0

      Expected Results

      The upgrade should complete without errors.

      Actual Results

      The below exception is thrown in the atlassian-confluence.log file:

      2021-04-16 19:49:03,109 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.DenormalisedSpacePermissionsUpgradeTask@63dd328c failed during the SCHEMA_UPGRADE phase due to: StatementCallback; uncategorized SQLException for SQL [CREATE TRIGGER dbo.denormalised_space_trigger
      ON confluence.company.com.dbo.SPACES
      AFTER INSERT, UPDATE, DELETE
      AS
      BEGIN
      SET NOCOUNT ON;
      if (dbo.space_function_for_denormalised_permissions() = 1)
      BEGIN
      INSERT INTO DENORMALISED_SPACE_CHANGE_LOG (space_id) select SPACEID from inserted;
      INSERT INTO DENORMALISED_SPACE_CHANGE_LOG (space_id) select SPACEID from deleted;
      END
      END
      ]; SQL state [S0001]; error code [117]; The object name 'confluence.company.com.dbo.SPACES' contains more than the maximum number of prefixes. The maximum is 2.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The object name 'confluence.company.com.dbo.SPACES' contains more than the maximum number of prefixes. The maximum is 2.
      

      Workaround

      Update the database name and remove the periods(.) from the name and update the confluence.cfg.xml file with the new name.

      Notes

              03cb0c04aa4f Irina Tiapchenko
              fvanzyl Ferdinand van Zyl (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: