And also I have observed that SonarQube database having the tables with 2 different DB roles like db_owner and dbo.
(E.g.: db_owner.properties , dbo.user)
As per the logs, it is mentioned that the table already exists in SonarQube database. These table are belongs to db_owner role based tables. If I removed all the db_owner.tables from SonarQube database and trying to start the upgrade then upgrade is successful without any issues but SonarQube dashboard displays with empty data. is it performing fresh installation instead of upgrade?
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #1 'Create initial schema' failed
This has the word “migration” in it, but the step that failed is (emphasis added) “Create initial schema”. What that means is that when SonarQube connected to your database, it didn’t find anything to migrate. In fact, it didn’t find anything it recognized at all. So it set out to create its database schema like with a brand new install.
What you’ve mentioned about DB roles is interesting, but this is probably going to come back to your database connection. Are you sure you’re connecting to the right schema in the right database with the right permissions?
Uhm… Don’t do that. You should never touch SonarQube’s database manually unless it’s under the direction of a SonarSourcer.
Now I changed the default schema value from db_owner to dbo and tried to upgrade the Sonarqube 7.9.4 version by starting the windows service. But database upgrade is failed during the setup process.
Below is the error on URL …/setup:
Upgrade Failed
Database connection cannot be established. Please check database status and JDBC settings.