0

We have recently upgraded Sonar to 5.3 version. Sonar has collation requirement (Latin1_General_CS_AS). Collation on our existing DB is - Latin1_General_CI_AS

Followed below steps: 1. Got a new DB with new collation. 2. Setup the Sonar instance on the new DB. This created the required tables. 3. Truncated data on the new DB(basically drop and recreated tables) 4. Did a SELECT INSERT to copy data from existing DB to new DB.

I am aware of Sonar DB copy tool but I believe this is only for Enterprise version. (http://docs.sonarqube.org/display/SONAR/Sonar+DB+Copy+Tool)

Sonar is up and running but we see the project links are broken. Is there a proper method to migrate data from old DB to new DB in Sonar?

I see below error in sonar log:

2016.07.07 14:59:29 ERROR web[o.s.s.ui.JRubyFacade] Fail to render: http://:42224/dashboard/index/20464 undefined method project' for nil:NilClass <INSTALL PATH>/web/WEB-INF/app/controllers/dashboard_controller.rb:53:inindex'

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
AmitP
  • 21
  • 4

1 Answers1

1

DB collation is automatically fixed in version 5.6, so I recommend to upgrade to this version instead of 5.3. It will avoid potential corrupted data introduced with your copy operation (for instance are the IDs correctly copied) ?

Simon Brandhof
  • 5,137
  • 1
  • 21
  • 28
  • hi Simon, Thanks for the response. Is there any check I can do to make sure the IDs are copied properly? Also, which DB collation is supported for Sonar 5.6 ? Let me check from my end too. – AmitP Jul 08 '16 at 13:20
  • hi, I tried to upgrade to 5.6 and see it is stuck at below : 2016.07.11 17:16:23 INFO ce[o.s.c.a.WebServerWatcherImpl] Waiting for Web Server to be operational... 2016.07.11 17:16:24 INFO ce[o.s.c.a.WebServerWatcherImpl] Still waiting for WebServer... – AmitP Jul 11 '16 at 16:31
  • Logs probably mention that you should start DB migration process by browsing http://yourserver/setup – Simon Brandhof Jul 13 '16 at 14:30
  • hi Simon, installed 5.6. Yes, that was the issue. It worked! Thanks. So post install of 5.6, there is no need to change DB collation to Latin1_General_CS_AS. Correct? Currently, it is on Latin1_General_CI_AS. – AmitP Jul 15 '16 at 14:13
  • correct, collation is fixed by SonarQube during startup. – Simon Brandhof Jul 18 '16 at 19:36