Need to know how we can migrate data post change of database collation change. Basically, below is what I am planning.
- Get a new DB with new collation which is a requirement for Sonar (Latin1_General_CS_AS). Collation on our existing DB is - Latin1_General_CI_AS
- Setup the Sonar service and point to the new database with new collation. This will create new tables required for Sonar on the database.
- Migrate data from old database to new database without changing collation.
I can import data using SELECT INSERT but I ran into issue where Sonar service didn't start post this.(SonarQube service not starting)
We had to truncate and drop tables and re-create them. Can someone advise how we can migrate data?
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)
This solution might help you. Basically, it exports information between databases and / or DBMS using simple scripts. BTW, it avoids duplication if projects already exist in the destination.
https://github.com/awltech/sonar-data-migrator
To use, follow below steps.
Usage
This script will migrate below things:
My migration was similar to yours (two databases in PostGre), step by step worked! :)