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

Confluence is not blocking the Upgrade if MS SQL has the wrong collation.

    XMLWordPrintable

Details

    Description

      If your Confluence is using the wrong collation in Microsoft SQL Server it shouldn't be possible to upgrade to version 5.2.3 or latest due the constraint check we added to block the upgrade, however those constraints are no longer working because the upgrade is no longer being blocked as it used to.

      Steps to reproduce:

      1. Set up a Confluence under version 5.2.3.
      2. Make sure to use the "SQL_Latin1_General_CP1_CI_AS" collation instead of "SQL_Latin1_General_CP1_CS_AS".
      3. Once this Confluence is up and running, upgrade it to version 5.2.3 or latest.
      4. The upgrade should fail due the constraint's we added around user mapping table, however it will work without problems.

      Diagnostic

      Run the below query against your Confluence MS SQL server database:

      SELECT object_name(object_id) as TableName, name as ColumnName, collation_name
      FROM sys.columns
      WHERE collation_name <> 'SQL_Latin1_General_CP1_CS_AS'
      AND object_name(object_id) NOT LIKE 'sys%' 
      AND object_name(object_id) NOT LIKE 'queue%'
      AND object_name(object_id) NOT LIKE 'file%'
      

      If the above return any results means your database is using the wrong collation.

      Work Around

      There are a few know methods we suggest our customers to use to address this:
      Always have a backup of your database before trying any of the below work around.
      Below methods will require some database knowledge in MsSQL Server, if possible engage your DBA in below activities.

      1. The resolution method provided in this KB which is not feasible to large instances since it relies on XML backup to create a clone instance.
      2. Install a fresh Confluence in the same version, making sure that this version is with the right collation as per our documentation. After that dummy instance is up do a few actions in this instance (like and watch a page to create a few AO tables) then use a data migration tool to migrate the data from the instance with the wrong collation to the dummy instance that should be using the correct collation.
      3. Follow this guide that teaches on how to manually fix the problem, which is a manual task and will be a very time consuming activity.
      4. Atlassian Experts, since they can provide a hands on assistance to address this (their services will be subject to a quote).
      5. The collation changer tool, which is a non supported tool that might result in data loss.
        We had good feedback from customers that tried the above tool, they didn't had nay data loss and the tool worked against SQL Server 2k5,2k8 and 2k12, even with those feedbacks this tool still should be used as a last resort, in case you decide for this option you will be using it at their own risk.

      Attachments

        Issue Links

          Activity

            People

              merickson Matthew Erickson
              dluvison Deividi Luvison (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: