Sonar' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup

Hi,

I am upgrading from 7.9 LTS to 8.9 LTS version. The DB migration failed in the below steps.
Caused by: java.lang.IllegalStateException: Fail to execute SELECT uuid, project_uuid, component_uuid, CAST (metric_id AS NVARCHAR (40)) AS metric_uuid, value, text_value, variation, measure_data, update_marker, created_at, updated_at INTO live_measures_copy FROM live_measures

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Could not allocate a new page for database ‘Sonar’ because of insufficient disk space in filegroup ‘PRIMARY’. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

Kindly help how to fix this?

Regards,
Guru

Hey Guru.

Indeed – the database migrations to upgrade from one SonarQube version to another can take up some significant space. That’s why we note this in the upgrade guide:

During your upgrade, tables may be duplicated to speed up the migration process, and this could cause your database disk usage to double. Because of this, we recommend that your database disk usage is below 50% before starting a migration.

The advice given by the warning message is fairly generic, and should be exactly what you need to do for Microsoft SQL Server.

Thanks for the hint. Issue resolved after clearing the space in DB.