Server ID changed if upgrade the DB

Template for a good bug report, formatted with Markdown:

  • versions used:
  • error observed: server id changed if upgrade the DB and changed the jdbc url
  • steps to reproduce:
    • upgrade pg from 9.4 to 12
    • Update the new jdbc url in sonar config file
      Then the server id was changed and the license became invalid.
  • potential workaround
  • have to ask sonar team to update the license.


  • should license be combined with company?

Hello Cathy,

A license is tied to a specific Server ID, and that Server ID is based on the database configuration (the sonar.jdbc.url set in your $SONARQUBE_HOME/conf/ file).

When the sonar.jdbc.url configuration is changed in the $SONARQUBE_HOME/conf/ file, it is fully expected the Server ID will regenerate and a new license is required

If you need a new license, please get in touch with


Thanks for replying Eric. I already sent an email to sonarsource contact.
Just wondering why it is based on database configuration. Since we will continually upgrade the database version which will make our lives very hard since we have to ask for a new license every time.
May I know why we can’t tie the license to a company?

Hello Cathy,

From our experience, Postgresql binary upgrades (like 9.6 to 12) are not that frequent and I suspect there will be some months/years before you will need to upgrade it again (assuming SonarQube will be compatible with those new PG versions)

Please note that as far as SonarQube upgrades are concerned they do not systematically require the Database URL to be changed and by default the same license will still apply for example from your SonarQube 8.4.2 to latest SonarQube 8.8

In any case, requesting a new license should be a fast process anyway.

Also I believe If a license was provided at company level, there might be temptation for users to overuse the same license across many SonarQube instances ,and bypass the global account of Lines of Code they are allowed to analyse