Sonar Server Store In Which tables related to Sonar Scan and coverage information in MySQL Database

I am using SonarQube 8.6 Version
I want to extract Sonar Scans and code coverage report from Sonar Backend Database like MySQL Using Select query.
Could you please someone help me on this ?
Sonar Server Store In Which tables related to Sonar Scan and coverage information in MySQL Database.

Hi @mr.engineer ,

as per our requirements, MySQL is no longer supported as a DBMS for sonarqube.

Also i have seen that you already raised a similar topic here, so it would be great to have this in one place. Apart from that i can already give you the same answer as Cameron on this. The Database Schema is constantly changing and it would be a bad idea to try to extract information from the database without having a look at every migration that will come with an update. You are better off using our API to extract information about code coverage (API endpoint api/measures/component).

Here is an example query via curl assuming you have a component called test and your sonarqube server is on localhost:9000 with the credentials admin:admin :

curl -u admin:admin "http://localhost:9000/api/measures/component?additionalFields=metrics&component=test&metricKeys=coverage%2Cnew_coverage"

Yes, I understood but I am curious to know in which table actually data store , Could you please help me for this ?

you would have to do multiple queries to get the information that you want. our schema is open source, so you can have a look at it yourself:

but again the warning, that this schema is open to be changed at any given time, so even when you create a working query right now, it could break with the next update. i highly encourage you to NOT manually query or alter the database!