There might be a tons of reasons behind it – you might want to take advantage of SonarQube’s support for SQL Azure Database, and it is totally fair enough.
There was a showstopper in the past if you were on 5.5 – this bug, fixed with the 5.6 release.
So let’s move! But upgrade to 5.6 first, on-premise so you are going to have a clear starting point.
The first thing you need to do is to create a new SQL Azure Database in your subscription. Call it like the one you have on-premise, and use the same collation (tip: remember CS_AS…) for peace of mind.
Then (unless you are using SQL Server 2016) run the SQL Azure Migration Wizard. This tool will do everything on your behalf, and it is going to migrate the database in the cloud.
If you get any connection error here, remember that SQL Azure is locked down for external access – you need to add the IP address for client connectivity to the Azure Firewall:
As you would be using SQL Server Authentication, you also need to create a SQL User for SonarQube. Even if you already used that, the users are not migrated by the tool so it is something to do anyway.
Eventually, change the SonarQube database connection string to your new <azure DB>.database.windows.net in the sonar.properties file:
Done! It is really easy, and if you are moving from a SQL Server Enterprise Edition it is also cheaper.