SonarQube MySQL Database Migrator
You can use the SonarQube MySQL Database Migrator to copy your SonarQube database from your MySQL (source) database to a non-MySQL (target) database.
- SonarQube version 6.7LTS to 7.8
Note: Your source and target databases must be using the same version of SonarQube.
- Currently using MySQL
Supported Target Databases
|9.3 - 9.6|
|Microsoft SQL Server||2017 (MSSQL Server 14.0) with bundled Microsoft JDBC driver. Express Edition is supported.|
|2016 (MSSQL Server 13.0) with bundled Microsoft JDBC driver. Express Edition is supported.|
|2014 (MSSQL Server 12.0) with bundled Microsoft JDBC driver. Express Edition is supported.|
Migrating your database
Warning: do not run migration on live SonarQube instances.
To copy your SonarQube database from your source database to the target database, follow these steps:
Download the latest release of the migrator and unzip it.
Start then stop the same version of SonarQube that you're running on your source database on your target database. For example, if you're running SonarQube 7.3 on your source database, run then stop SonarQube 7.3 on your target database.
Delete the Elasticsearch data folder in the target SonarQube instance:
data/es5on SonarQube 6.7-7.6 and
data/es6on SonarQube 7.7 and above.
Run the migrator with
-helpto get usage instructions.
PATHis the path to the configuration file of your SonarQube instance running MySQL.
PATHis the path to the configuration file of your SonarQube instance running a non-MySQL database.
Note: The source database must be a MySQL database, and the target database must be a non-MySQL database.
The configuration files use the same format as
sonar.properties file in a SonarQube installation, and you can even directly use the path to a
sonar.properties file of a SonarQube instance. Your configuration files should be formatted as follows:
sonar.jdbc.url = jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false sonar.jdbc.username = sonar sonar.jdbc.password = sonar
The migrator performs various sanity checks before copying data and prints diagnostics about its progress. It stops on the first error. Read the error messages carefully.
Migrating with an Oracle target
The Oracle database driver is not included in the distribution, so you must provide it yourself.
Please download the JDBC driver for Oracle and copy it to the
directory in the unzipped folder of the migration tool. The file must be named
With the Java driver in place, follow the steps above to migrate just like any other database.